mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
impr: Replace hex::unused with std::ignore
This commit is contained in:
@@ -60,7 +60,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
// Draw hex editor background highlights for bookmarks
|
||||
ImHexApi::HexEditor::addBackgroundHighlightingProvider([this](u64 address, const u8* data, size_t size, bool) -> std::optional<color_t> {
|
||||
hex::unused(data);
|
||||
std::ignore = data;
|
||||
|
||||
// Check all bookmarks for potential overlaps with the current address
|
||||
for (const auto &bookmark : *m_bookmarks) {
|
||||
@@ -73,7 +73,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
// Draw hex editor tooltips for bookmarks
|
||||
ImHexApi::HexEditor::addTooltipProvider([this](u64 address, const u8 *data, size_t size) {
|
||||
hex::unused(data);
|
||||
std::ignore = data;
|
||||
|
||||
// Loop over all bookmarks
|
||||
for (const auto &[bookmark, editor] : *m_bookmarks) {
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace hex::plugin::builtin {
|
||||
const static auto HighlightColor = [] { return (ImGuiExt::GetCustomColorU32(ImGuiCustomCol_FindHighlight) & 0x00FFFFFF) | 0x70000000; };
|
||||
|
||||
ImHexApi::HexEditor::addBackgroundHighlightingProvider([this](u64 address, const u8* data, size_t size, bool) -> std::optional<color_t> {
|
||||
hex::unused(data, size);
|
||||
std::ignore = data;
|
||||
std::ignore = size;
|
||||
|
||||
if (m_searchTask.isRunning())
|
||||
return { };
|
||||
@@ -33,7 +34,8 @@ namespace hex::plugin::builtin {
|
||||
});
|
||||
|
||||
ImHexApi::HexEditor::addTooltipProvider([this](u64 address, const u8* data, size_t size) {
|
||||
hex::unused(data, size);
|
||||
std::ignore = data;
|
||||
std::ignore = size;
|
||||
|
||||
if (m_searchTask.isRunning())
|
||||
return;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace hex::plugin::builtin {
|
||||
});
|
||||
|
||||
ImHexApi::HexEditor::addForegroundHighlightingProvider([this](u64 offset, const u8* buffer, size_t, bool) -> std::optional<color_t> {
|
||||
hex::unused(buffer);
|
||||
std::ignore = buffer;
|
||||
|
||||
if (!ImHexApi::Provider::isValid())
|
||||
return std::nullopt;
|
||||
|
||||
@@ -1535,7 +1535,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
auto mimeType = magic::getMIMEType(provider, 0, 100_KiB, true);
|
||||
runtime.addPragma("MIME", [&mimeType, &foundCorrectType](const pl::PatternLanguage &runtime, const std::string &value) {
|
||||
hex::unused(runtime);
|
||||
std::ignore = runtime;
|
||||
|
||||
if (!magic::isValidMIMEType(value))
|
||||
return false;
|
||||
@@ -2191,7 +2191,8 @@ namespace hex::plugin::builtin {
|
||||
});
|
||||
|
||||
ImHexApi::HexEditor::addBackgroundHighlightingProvider([this](u64 address, const u8 *data, size_t size, bool) -> std::optional<color_t> {
|
||||
hex::unused(data, size);
|
||||
std::ignore = data;
|
||||
std::ignore = size;
|
||||
|
||||
if (m_runningEvaluators != 0)
|
||||
return std::nullopt;
|
||||
@@ -2232,7 +2233,8 @@ namespace hex::plugin::builtin {
|
||||
});
|
||||
|
||||
ImHexApi::HexEditor::addTooltipProvider([this](u64 address, const u8 *data, size_t size) {
|
||||
hex::unused(data, size);
|
||||
std::ignore = data;
|
||||
std::ignore = size;
|
||||
|
||||
if (TRY_LOCK(ContentRegistry::PatternLanguage::getRuntimeLock())) {
|
||||
const auto &runtime = ContentRegistry::PatternLanguage::getRuntime();
|
||||
|
||||
Reference in New Issue
Block a user