Permalink
Browse files

Fix for viewer build, plus got rid of last variable-sized array warnings

  • Loading branch information...
xoltar committed Nov 24, 2016
1 parent 9f6fee9 commit d3cf207bdf62ba470c7026b542f40d233b6c61aa
Showing with 8 additions and 3 deletions.
  1. +4 −1 RIVET.pro
  2. +4 −2 cutgraph.h
View
@@ -32,6 +32,7 @@ SOURCES += main.cpp \
interface/persistence_dot.cpp \
interface/slice_diagram.cpp \
interface/slice_line.cpp \
math/bool_array.cpp \
math/index_matrix.cpp \
math/map_matrix.cpp \
#math/multi_betti.cpp \
@@ -58,6 +59,7 @@ SOURCES += main.cpp \
interface/console_interaction.cpp \
numerics.cpp \
HEADERS += visualizationwindow.h \
dataselectdialog.h \
dcel/dcel.h \
@@ -69,12 +71,13 @@ HEADERS += visualizationwindow.h \
interface/persistence_dot.h \
interface/slice_diagram.h \
interface/slice_line.h \
math/bool_array.h \
math/index_matrix.h \
math/map_matrix.h \
math/multi_betti.h \
math/simplex_tree.h \
math/st_node.h \
interface/barcode.h \
dcel/barcode.h \
dcel/barcode_template.h \
dcel/anchor.h \
dcel/grades.h \
View
@@ -15,8 +15,8 @@
void sortAdjacencies(std::vector<std::vector<unsigned>>& adjList, std::vector<std::vector<unsigned>>& distances,
unsigned start, std::vector<std::vector<unsigned>>& children)
{
bool discovered[adjList.size()]; // boolean array for keeping track of which nodes have been visited
unsigned branchWeight[adjList.size()]; // this will contain the weight of the edges "hanging" from the node represented by its index in branchWeight
bool *discovered = new bool[adjList.size()]; // boolean array for keeping track of which nodes have been visited
unsigned * branchWeight = new unsigned[adjList.size()]; // this will contain the weight of the edges "hanging" from the node represented by its index in branchWeight
// populate the boolean array with false and the branchWeight array with 0
for (unsigned i = 0; i < adjList.size(); ++i) {
discovered[i] = false;
@@ -79,4 +79,6 @@ void sortAdjacencies(std::vector<std::vector<unsigned>>& adjList, std::vector<st
}
}
} // end while
delete[] branchWeight;
delete[] discovered;
} // end sortAdjacencies()

0 comments on commit d3cf207

Please sign in to comment.