Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/records/RecCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void Enable_Config_Var(std::string_view const &name, RecContextCb record_cb, Rec

RecErrT RecSetRecordInt(const char *name, RecInt rec_int, RecSourceT source, bool lock = true);
RecErrT RecSetRecordFloat(const char *name, RecFloat rec_float, RecSourceT source, bool lock = true);
RecErrT RecSetRecordString(const char *name, const RecString rec_string, RecSourceT source, bool lock = true);
RecErrT RecSetRecordString(const char *name, RecStringConst rec_string, RecSourceT source, bool lock = true);
RecErrT RecSetRecordCounter(const char *name, RecCounter rec_counter, RecSourceT source, bool lock = true);

std::optional<RecInt> RecGetRecordInt(const char *name, bool lock = true);
Expand Down
2 changes: 1 addition & 1 deletion src/mgmt/rpc/handlers/config/Configuration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace
return false;
}
} else if constexpr (std::is_same_v<T, std::string>) {
if (RecSetRecordString(info.name.c_str(), const_cast<char *>(info.value.c_str()), REC_SOURCE_DEFAULT) != REC_ERR_OKAY) {
if (RecSetRecordString(info.name.c_str(), info.value.c_str(), REC_SOURCE_DEFAULT) != REC_ERR_OKAY) {
return false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/records/P_RecCore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ RecSetRecordFloat(const char *name, RecFloat rec_float, RecSourceT source, bool
}

RecErrT
RecSetRecordString(const char *name, const RecString rec_string, RecSourceT source, bool lock)
RecSetRecordString(const char *name, RecStringConst rec_string, RecSourceT source, bool lock)
{
RecData data;
data.rec_string = rec_string;
data.rec_string = const_cast<RecString>(rec_string);
return RecSetRecord(RECT_NULL, name, RECD_STRING, &data, nullptr, source, lock);
}

Expand Down