mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
chore: apply more complicated lints (#2576)
<!-- Please provide as much information as possible about what your PR aims to do. PRs with no description will most likely be closed until more information is provided. If you're planing on changing fundamental behaviour or add big new features, please open a GitHub Issue first before starting to work on it. If it's not something big and you still want to contact us about it, feel free to do so ! --> ### Problem description <!-- Describe the bug that you fixed/feature request that you implemented, or link to an existing issue describing it --> ### Implementation description <!-- Explain what you did to correct the problem --> ### Screenshots <!-- If your change is visual, take a screenshot showing it. Ideally, make before/after sceenshots --> ### Additional things <!-- Anything else you would like to say -->
This commit is contained in:
@@ -589,8 +589,8 @@ namespace hex::init {
|
||||
for (auto &highlight : m_highlights) {
|
||||
u32 newPos = lastPos + lastCount + (rng() % 35);
|
||||
u32 newCount = (rng() % 7) + 3;
|
||||
highlight.start.x = float(newPos % 13);
|
||||
highlight.start.y = float(newPos / 13);
|
||||
highlight.start.x = newPos % 13;
|
||||
highlight.start.y = int(newPos / 13);
|
||||
highlight.count = newCount;
|
||||
|
||||
highlight.color = getHighlightColor(index);
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace hex {
|
||||
|
||||
LayoutManager::registerLoadCallback([this](std::string_view line) {
|
||||
int width = 0, height = 0;
|
||||
sscanf(line.data(), "MainWindowSize=%d,%d", &width, &height);
|
||||
sscanf(std::string(line).data(), "MainWindowSize=%d,%d", &width, &height);
|
||||
|
||||
if (width > 0 && height > 0) {
|
||||
TaskManager::doLater([width, height, this]{
|
||||
@@ -1011,7 +1011,7 @@ namespace hex {
|
||||
|
||||
try {
|
||||
log::error("GLFW Error [0x{:05X}] : {}", error, desc);
|
||||
} catch (const std::system_error &) {
|
||||
} catch (const std::system_error &) { //NOLINT(bugprone-empty-catch): we can't log it
|
||||
// Catch and ignore system error that might be thrown when too many errors are being logged to a file
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user