diff --git a/apps/nexus/borderserver.cpp b/apps/nexus/borderserver.cpp index 123bef9f..2455ed10 100644 --- a/apps/nexus/borderserver.cpp +++ b/apps/nexus/borderserver.cpp @@ -128,8 +128,7 @@ bool BorderServer::LoadHeader() { cerr << "Invalid magic. Not a nxs file\n"; return false; } - ReadBuffer(&offset, sizeof(int64)); - cerr << "Offset: " << offset << endl; + ReadBuffer(&offset, sizeof(int64)); return true; } diff --git a/apps/nexus/history.cpp b/apps/nexus/history.cpp index 1b368227..712cda6f 100644 --- a/apps/nexus/history.cpp +++ b/apps/nexus/history.cpp @@ -288,9 +288,9 @@ bool History::UpdatesToQuick() { frags = (Cell *)(out_links + n_out_links()); memcpy(nodes, &*tmp_nodes.begin(), tmp_nodes.size()*sizeof(Node)); - memcpy(in_links, &*tmp_in_links.begin(), tmp_in_links.size()*sizeof(Node)); + memcpy(in_links, &*tmp_in_links.begin(), tmp_in_links.size()*sizeof(Link)); memcpy(out_links, &*tmp_out_links.begin(), - tmp_out_links.size()*sizeof(Node)); + tmp_out_links.size()*sizeof(Link)); memcpy(frags, &*tmp_frags.begin(), tmp_frags.size() * sizeof(Cell)); return LoadPointers(); diff --git a/apps/nexus/nxstest.cpp b/apps/nexus/nxstest.cpp index bdded76a..dbd7df00 100644 --- a/apps/nexus/nxstest.cpp +++ b/apps/nexus/nxstest.cpp @@ -17,10 +17,10 @@ int main(int argc, char *argv[]) { cerr << "Could not open file: " << argv[1] << endl; return -1; } - Report report(nexus.index.size()); - for(unsigned int patchid = 0; patchid < nexus.index.size(); patchid++) { + Report report(nexus.size()); + for(unsigned int patchid = 0; patchid < nexus.size(); patchid++) { report.Step(patchid); - PatchInfo &info = nexus.index[patchid]; + Entry &info = nexus[patchid]; Patch &patch = nexus.GetPatch(patchid); for(int f = 0; f < patch.nf; f++) { unsigned short *face = patch.Face(f); @@ -51,8 +51,8 @@ int main(int argc, char *argv[]) { cerr << "Testing borders\n"; - for(unsigned int patchid = 0; patchid < nexus.index.size(); patchid++) { - PatchInfo &info = nexus.index[patchid]; + for(unsigned int patchid = 0; patchid < nexus.size(); patchid++) { + Entry &info = nexus[patchid]; Border &border = nexus.GetBorder(patchid); for(unsigned int i = 0; i < border.Size(); i++) { Link &link = border[i]; @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) { cerr << "Null link: " << i << " at patch: " << patchid << endl; exit(0); } - if(link.end_patch < 0 || link.end_patch >= nexus.index.size()) { + if(link.end_patch < 0 || link.end_patch >= nexus.size()) { cerr << "Invalid link end patch: " << link.end_patch << " at patch: " << patchid << endl; exit(0); } @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) { cerr << "Invalid link start_vert: " << link.start_vert << " at patch: " << patchid << endl; exit(0); } - if(link.end_vert > nexus.index[link.end_patch].nvert) { + if(link.end_vert > nexus[link.end_patch].nvert) { cerr << "Invalid link end vert: " << link.end_vert << " at patch: " << patchid << endl; exit(0); } @@ -79,8 +79,8 @@ int main(int argc, char *argv[]) { } cerr << "Reciprocity borders test\n"; - for(unsigned int patchid = 0; patchid < nexus.index.size(); patchid++) { - PatchInfo &info = nexus.index[patchid]; + for(unsigned int patchid = 0; patchid < nexus.size(); patchid++) { + Entry &info = nexus[patchid]; Border &border = nexus.GetBorder(patchid); vector links; links.resize(border.Size());