🎨 style(shortcuts): annotated inlined helper functions and updated stdio include

This commit is contained in:
ragnarok-clanker 2026-10-27 10:02:55 +01:00
commit 98e3d7fa17
5 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,7 @@
#include "UI/Window/WindowRetirement.h"
namespace {
// INLINED
void ToScreen(const UIWindow& window, int& x, int& y) {
x = (x + window.geometry.x);
y = (y + window.geometry.y);

View file

@ -9,6 +9,7 @@
#include <timeapi.h>
namespace {
// INLINED
bool Grouped(std::uint32_t id) {
return id - 8000u <= 60 || id - 8200u <= 41 || id - 8400u <= 57;
}

View file

@ -3,9 +3,10 @@
#include "UI/Buttons/UIButton.h"
#include "UI/Window/UIWindow.h"
#include <cstdio>
#include <stdio.h>
namespace {
// INLINED
void ToScreen(const UIWindow& window, int& x, int& y) {
x = (x + window.geometry.x);
y = (y + window.geometry.y);

View file

@ -3,10 +3,12 @@
#include <windows.h>
namespace {
// INLINED
bool Hex(unsigned char value) {
return (value >= '0' && value <= '9') || (value >= 'a' && value <= 'f') || (value >= 'A' && value <= 'F');
}
// INLINED
bool Color(const char* text, const char* end) {
if (*text != '^' || end - text < 6) {
return false;

View file

@ -12,6 +12,7 @@
#include <algorithm>
namespace {
// INLINED
unsigned Digit(unsigned char value) {
if (value >= '0' && value <= '9') {
return value - '0';
@ -28,6 +29,7 @@ namespace {
return 0;
}
// INLINED
void ScanColors(const std::string& line, unsigned short codePage, std::uint32_t& color) {
const char* current = line.c_str();
const char* end = current + line.size();