mirror of https://github.com/WerWolv/ImHex
impr: Less unnecessary copying
This commit is contained in:
parent
8d4415fe15
commit
59f9da59e2
|
|
@ -336,7 +336,7 @@ namespace hex::magic {
|
|||
|
||||
if (pattern->matches(bytes)) {
|
||||
foundCorrectType = true;
|
||||
magicOffset = *address;
|
||||
magicOffset = address;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -899,7 +899,7 @@ namespace hex::plugin::builtin {
|
|||
}
|
||||
ImGui::NewLine();
|
||||
|
||||
const std::array<std::string, 10> InputTypes = {
|
||||
constexpr static std::array InputTypes = {
|
||||
"hex.ui.common.type.u8"_lang,
|
||||
"hex.ui.common.type.u16"_lang,
|
||||
"hex.ui.common.type.u32"_lang,
|
||||
|
|
@ -912,11 +912,11 @@ namespace hex::plugin::builtin {
|
|||
"hex.ui.common.type.f64"_lang
|
||||
};
|
||||
|
||||
if (ImGui::BeginCombo("hex.ui.common.type"_lang, InputTypes[std::to_underlying(settings.type)].c_str())) {
|
||||
if (ImGui::BeginCombo("hex.ui.common.type"_lang, InputTypes[std::to_underlying(settings.type)].get())) {
|
||||
for (size_t i = 0; i < InputTypes.size(); i++) {
|
||||
auto type = static_cast<SearchSettings::Value::Type>(i);
|
||||
|
||||
if (ImGui::Selectable(InputTypes[i].c_str(), type == settings.type)) {
|
||||
if (ImGui::Selectable(InputTypes[i].get(), type == settings.type)) {
|
||||
settings.type = type;
|
||||
edited = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue