Skip to content

Commit

Permalink
Use the anonymous namespace for a file-local class in stogo (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri authored Oct 31, 2023
1 parent 3f9cfd3 commit 5880e23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/algs/stogo/stogo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "stogo.h"
#include "global.h"

namespace {
class MyGlobal : public Global {
protected:
objective_func my_func;
Expand All @@ -25,6 +26,7 @@ class MyGlobal : public Global {
return 0.0;
}
};
} // namespace

int stogo_minimize(int n,
objective_func fgrad, void *data,
Expand Down

0 comments on commit 5880e23

Please sign in to comment.