sys: Upgrade codebase to C++23
This commit is contained in:
parent
ed67c20cba
commit
626c34dce8
@ -5,7 +5,7 @@ file(READ "VERSION" IMHEX_VERSION)
|
||||
project(imhex VERSION ${IMHEX_VERSION})
|
||||
message("Project version ${IMHEX_VERSION}")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(IMHEX_BASE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(CMAKE_MODULE_PATH "${IMHEX_BASE_FOLDER}/cmake/modules")
|
||||
include("${IMHEX_BASE_FOLDER}/cmake/build_helpers.cmake")
|
||||
|
@ -91,7 +91,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
void load(nlohmann::json &j) override {
|
||||
this->m_value = j["data"];
|
||||
this->m_value = j["data"].get<std::string>();
|
||||
}
|
||||
|
||||
private:
|
||||
@ -213,7 +213,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
void load(nlohmann::json &j) override {
|
||||
this->m_comment = j["comment"];
|
||||
this->m_comment = j["comment"].get<std::string>();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -712,8 +712,8 @@ namespace hex::plugin::builtin {
|
||||
|
||||
auto json = nlohmann::json::parse(response.body);
|
||||
|
||||
resultTitle = json["query"]["pages"][0]["title"];
|
||||
resultExtract = json["query"]["pages"][0]["extract"];
|
||||
resultTitle = json["query"]["pages"][0]["title"].get<std::string>();
|
||||
resultExtract = json["query"]["pages"][0]["extract"].get<std::string>();
|
||||
|
||||
if (!extendedSearch && resultExtract.ends_with(':')) {
|
||||
extendedSearch = true;
|
||||
|
@ -34,11 +34,11 @@ namespace hex::plugin::builtin {
|
||||
|
||||
for (auto value : content["values"]) {
|
||||
Constant constant;
|
||||
constant.category = content["name"];
|
||||
constant.name = value["name"];
|
||||
constant.category = content["name"].get<std::string>();
|
||||
constant.name = value["name"].get<std::string>();
|
||||
if (value.contains("desc"))
|
||||
constant.description = value["desc"];
|
||||
constant.value = value["value"];
|
||||
constant.description = value["desc"].get<std::string>();
|
||||
constant.value = value["value"].get<std::string>();
|
||||
|
||||
auto type = value["type"];
|
||||
if (type == "int10")
|
||||
|
Loading…
Reference in New Issue
Block a user