add some static asserts to guard against memory usage regressions

This commit is contained in:
Dennis Luxen
2014-05-22 12:41:25 +02:00
parent 0b873f590c
commit d93b4feb99
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -49,6 +49,7 @@ typedef DynamicGraph<NodeBasedEdgeData> NodeBasedDynamicGraph;
inline std::shared_ptr<NodeBasedDynamicGraph>
NodeBasedDynamicGraphFromImportEdges(int number_of_nodes, std::vector<ImportEdge> &input_edge_list)
{
static_assert(sizeof(NodeBasedEdgeData) == 16, "changing node based edge data size changes memory consumption");
std::sort(input_edge_list.begin(), input_edge_list.end());
// TODO: remove duplicate edges