@@ -68,9 +68,9 @@ struct options {
68
68
namespace impl {
69
69
70
70
template <typename T>
71
- bool multi_line (const T& json,
72
- const options& options,
73
- std::optional<std::string> parent_object_key) {
71
+ inline bool multi_line (const T& json,
72
+ const options& options,
73
+ std::optional<std::string> parent_object_key) {
74
74
if (json.is_object ()) {
75
75
if (json.size () == 0 ) {
76
76
return false ;
@@ -113,20 +113,20 @@ bool multi_line(const T& json,
113
113
return false ;
114
114
}
115
115
116
- void indent (std::ostringstream& ss,
117
- const options& options,
118
- int indent_level) {
116
+ inline void indent (std::ostringstream& ss,
117
+ const options& options,
118
+ int indent_level) {
119
119
for (int i = 0 ; i < options.indent_size * indent_level; ++i) {
120
120
ss << ' ' ;
121
121
}
122
122
}
123
123
124
124
template <typename T>
125
- void format (std::ostringstream& ss,
126
- const T& json,
127
- const options& options,
128
- std::optional<std::string> parent_object_key,
129
- int indent_level) {
125
+ inline void format (std::ostringstream& ss,
126
+ const T& json,
127
+ const options& options,
128
+ std::optional<std::string> parent_object_key,
129
+ int indent_level) {
130
130
if (json.is_object ()) {
131
131
if (!multi_line (json, options, parent_object_key)) {
132
132
//
@@ -250,8 +250,8 @@ void format(std::ostringstream& ss,
250
250
} // namespace impl
251
251
252
252
template <typename T>
253
- std::string format (const T& json,
254
- const options& options) {
253
+ inline std::string format (const T& json,
254
+ const options& options) {
255
255
std::ostringstream ss;
256
256
impl::format (ss, json, options, std::nullopt, 0 );
257
257
return ss.str ();
0 commit comments