🎨 style(shortcuts): annotated inlined helper functions and updated stdio include
This commit is contained in:
parent
779dd40d2e
commit
98e3d7fa17
5 changed files with 8 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue