🛠️ refactor(source): annotated inlined functions and removed unused include

This commit is contained in:
ragnarok-clanker 2026-10-27 10:01:19 +01:00
commit 779dd40d2e
6 changed files with 6 additions and 2 deletions

View file

@ -10,6 +10,7 @@
#include <utility>
namespace {
// INLINED
BrowserWindowSizing Sizing(CWebBrowser& owner) {
return {owner.browser, owner.screenWidth, owner.screenHeight, owner.rebar, owner.auxiliaryVisible, owner.width, owner.height};
}

View file

@ -8,6 +8,7 @@ extern "C" {
#include <cstdint>
namespace {
// INLINED
CPlayerSkillBundle& Bundle(lua_State* state) {
return *static_cast<CPlayerSkillBundle*>(lua_touserdata(state, lua_upvalueindex(1)));
}
@ -59,6 +60,7 @@ namespace {
}
}
// INLINED
void RegisterSkillTreeCallbacks(lua_State* state, CPlayerSkillBundle& bundle) {
lua_pushlightuserdata(state, &bundle);
lua_pushcclosure(state, AddSkill, 1);

View file

@ -3,6 +3,7 @@
#include <algorithm>
namespace {
// INLINED
void Append(std::vector<RenderVertex>& block, unsigned count) {
const unsigned first = static_cast<unsigned>(block.size());
block.resize(first + count);

View file

@ -1,7 +1,6 @@
#include "Render/Text/FontCache.h"
#include <algorithm>
#include <cstring>
#include <objidl.h>
#include <gdiplus.h>

View file

@ -19,6 +19,7 @@ namespace {
return name;
}
// INLINED
void ReadKeys(ResourceByteReader& input, std::vector<ModelRotationKey>& keys, bool scale) {
int count = 0;
input.Read(&count, 4);

View file

@ -2,10 +2,10 @@
#include "Resource/World/GroundResource.h"
#include "Resource/ResourceByteReader.h"
#include <bit>
#include <cstring>
namespace {
// INLINED
const unsigned char* Slice(ResourceByteReader& input, std::uint32_t bytes) {
const auto address = reinterpret_cast<std::uintptr_t>(input.data) + input.position;
input.position += bytes;