@@ -23,7 +23,7 @@ namespace glz
2323 struct registry_impl <Opts, REPE>
2424 {
2525 template <class T , class RegistryType >
26- static void register_endpoint (sv path, T& value, RegistryType& reg)
26+ static void register_endpoint (const sv path, T& value, RegistryType& reg)
2727 {
2828 reg.endpoints [path] = [&value](repe::state&& state) mutable {
2929 if (state.write ()) {
@@ -46,7 +46,7 @@ namespace glz
4646 }
4747
4848 template <class Func , class Result , class RegistryType >
49- static void register_function_endpoint (sv path, Func& func, RegistryType& reg)
49+ static void register_function_endpoint (const sv path, Func& func, RegistryType& reg)
5050 {
5151 if constexpr (std::same_as<Result, void >) {
5252 reg.endpoints [path] = [&func](repe::state&& state) mutable {
@@ -71,7 +71,7 @@ namespace glz
7171 }
7272
7373 template <class Func , class Params , class RegistryType >
74- static void register_param_function_endpoint (sv path, Func& func, RegistryType& reg)
74+ static void register_param_function_endpoint (const sv path, Func& func, RegistryType& reg)
7575 {
7676 reg.endpoints [path] = [&func](repe::state&& state) mutable {
7777 static thread_local std::decay_t <Params> params{};
@@ -103,7 +103,7 @@ namespace glz
103103 }
104104
105105 template <class Obj , class RegistryType >
106- static void register_object_endpoint (sv path, Obj& obj, RegistryType& reg)
106+ static void register_object_endpoint (const sv path, Obj& obj, RegistryType& reg)
107107 {
108108 reg.endpoints [path] = [&obj](repe::state&& state) mutable {
109109 if (state.write ()) {
@@ -126,7 +126,7 @@ namespace glz
126126 }
127127
128128 template <class Value , class RegistryType >
129- static void register_value_endpoint (sv path, Value& value, RegistryType& reg)
129+ static void register_value_endpoint (const sv path, Value& value, RegistryType& reg)
130130 {
131131 reg.endpoints [path] = [value](repe::state&& state) mutable {
132132 if (state.write ()) {
@@ -150,7 +150,7 @@ namespace glz
150150 }
151151
152152 template <class Var , class RegistryType >
153- static void register_variable_endpoint (sv path, Var& var, RegistryType& reg)
153+ static void register_variable_endpoint (const sv path, Var& var, RegistryType& reg)
154154 {
155155 reg.endpoints [path] = [&var](repe::state&& state) mutable {
156156 if (state.write ()) {
@@ -174,7 +174,7 @@ namespace glz
174174 }
175175
176176 template <class T , class F , class Ret , class RegistryType >
177- static void register_member_function_endpoint (sv path, T& value, F func, RegistryType& reg)
177+ static void register_member_function_endpoint (const sv path, T& value, F func, RegistryType& reg)
178178 {
179179 reg.endpoints [path] = [&value, func](repe::state&& state) mutable {
180180 if constexpr (std::same_as<Ret, void >) {
@@ -200,7 +200,7 @@ namespace glz
200200 }
201201
202202 template <class T , class F , class Input , class Ret , class RegistryType >
203- static void register_member_function_with_params_endpoint (sv path, T& value, F func, RegistryType& reg)
203+ static void register_member_function_with_params_endpoint (const sv path, T& value, F func, RegistryType& reg)
204204 {
205205 reg.endpoints [path] = [&value, func](repe::state&& state) mutable {
206206 static thread_local Input input{};
0 commit comments