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