Skip to content

Commit 4bdc69a

Browse files
committed
Make PrintTo functions static inline in perf_tests.cpp for better encapsulation. Add missing <ostream> include.
1 parent c966b97 commit 4bdc69a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/core/performance/tests/perf_tests.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <filesystem>
66
#include <fstream>
77
#include <memory>
8+
#include <ostream>
89
#include <stdexcept>
910
#include <string_view>
1011
#include <vector>
@@ -98,7 +99,7 @@ struct ParamTestCase {
9899
std::string expected_output;
99100
};
100101

101-
inline void PrintTo(const ParamTestCase& param, std::ostream* os) {
102+
static inline void PrintTo(const ParamTestCase& param, std::ostream* os) {
102103
*os << "{ input = " << static_cast<int>(param.input) << ", expected = " << param.expected_output << " }";
103104
}
104105

@@ -122,7 +123,7 @@ struct TaskTypeTestCase {
122123
std::string label;
123124
};
124125

125-
inline void PrintTo(const TaskTypeTestCase& param, std::ostream* os) {
126+
static inline void PrintTo(const TaskTypeTestCase& param, std::ostream* os) {
126127
*os << "{ type = " << static_cast<int>(param.type) << ", expected = " << param.expected << ", label = " << param.label
127128
<< " }";
128129
}

0 commit comments

Comments
 (0)