From de6194f022ff439dfa04f5c01cd5299d2cef5cc8 Mon Sep 17 00:00:00 2001 From: Jeremy Nimmer Date: Mon, 30 Oct 2023 14:33:57 -0700 Subject: [PATCH] Use the anonymous namespace for a file-local class in stogo --- src/algs/stogo/stogo.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/algs/stogo/stogo.cc b/src/algs/stogo/stogo.cc index 9017242e..b6463b2f 100644 --- a/src/algs/stogo/stogo.cc +++ b/src/algs/stogo/stogo.cc @@ -4,6 +4,7 @@ #include "stogo.h" #include "global.h" +namespace { class MyGlobal : public Global { protected: objective_func my_func; @@ -25,6 +26,7 @@ class MyGlobal : public Global { return 0.0; } }; +} // namespace int stogo_minimize(int n, objective_func fgrad, void *data,