Skip to content

Commit

Permalink
updated tests for new std::function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVonB committed Feb 4, 2018
1 parent a9fc7e6 commit c6acc64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions MemoryTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int SomeThing::s_outstandingAllocs = 0;


/// A callback function to obtain query results in this implementation
bool QueryResultCallback(SomeThing* a_data, void* a_context)
bool QueryResultCallback(SomeThing* a_data)
{
printf("search found %d\n", a_data->m_creationCounter);

Expand Down Expand Up @@ -203,7 +203,7 @@ int main(int argc, char* argv[])

Vec3 searchMin(0,0,0);
Vec3 searchMax(FRAC_WORLDSIZE, FRAC_WORLDSIZE, FRAC_WORLDSIZE);
tree.Search(searchMin.v, searchMax.v, &QueryResultCallback, NULL);
tree.Search(searchMin.v, searchMax.v, &QueryResultCallback);

// NOTE: Even better than just dumping text, it would be nice to render the
// tree contents and search result for visualization.
Expand Down
4 changes: 2 additions & 2 deletions Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int nrects = sizeof(rects) / sizeof(rects[0]);
Rect search_rect(6, 4, 10, 6); // search will find above rects that this one overlaps


bool MySearchCallback(ValueType id, void* arg)
bool MySearchCallback(ValueType id)
{
cout << "Hit data rect " << id << "\n";
return true; // keep going
Expand All @@ -62,7 +62,7 @@ int main()
tree.Insert(rects[i].min, rects[i].max, i); // Note, all values including zero are fine in this version
}

nhits = tree.Search(search_rect.min, search_rect.max, MySearchCallback, NULL);
nhits = tree.Search(search_rect.min, search_rect.max, MySearchCallback);

cout << "Search resulted in " << nhits << " hits\n";

Expand Down
4 changes: 2 additions & 2 deletions TestBadData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct Rect
};


bool MySearchCallback(ValueType id, void* arg)
bool MySearchCallback(ValueType id)
{
cout << "Hit data rect " << id << "\n";
return true; // keep going
Expand Down Expand Up @@ -74,7 +74,7 @@ int main( int argc, char* argv[] )
}

Rect search_rect(6, 4, 10, 6);
nhits = tree.Search(search_rect.min, search_rect.max, MySearchCallback, NULL);
nhits = tree.Search(search_rect.min, search_rect.max, MySearchCallback);

cout << "Search resulted in " << nhits << " hits\n";

Expand Down

0 comments on commit c6acc64

Please sign in to comment.