Skip to content

Commit 82b1936

Browse files
author
Sonny Martin
committed
Use unnamed namespace for validate_goto_modelt
The overall pattern here is a global function that instantiates a utility class for a specific purpose (not a general utility class). This clarifies that separation of concerns. Class 'validate_goto_modelt' does not need to be globally visible.
1 parent 2d24e4a commit 82b1936

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/goto-programs/validate_goto_model.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Date: Oct 2018
1414
#include "goto_functions.h"
1515
#include <util/invariant.h>
1616

17+
namespace
18+
{
1719
class validate_goto_modelt
1820
{
1921
public:
@@ -76,6 +78,7 @@ class validate_goto_modelt
7678
const function_mapt &function_map;
7779
const goto_model_validation_optionst validation_options;
7880
};
81+
} // namespace
7982

8083
void validate_goto_modelt::do_goto_program_checks(
8184
goto_model_validation_optionst validation_options)

0 commit comments

Comments
 (0)