Skip to content

Commit 7ffab7e

Browse files
authored
fix: Make impossible to accidently copy JsonExporter singleton (#975)
1 parent 793a6bd commit 7ffab7e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/behaviortree_cpp/json_export.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ class JsonExporter
5151
public:
5252
static JsonExporter& get();
5353

54+
// Delete copy constructors as can only be this one global instance.
55+
JsonExporter& operator=(JsonExporter&&) = delete;
56+
JsonExporter& operator=(JsonExporter&) = delete;
57+
5458
/**
5559
* @brief toJson adds the content of "any" to the JSON "destination".
5660
*

0 commit comments

Comments
 (0)