rodecomp/Source/Contents/InstantVar.h
ragnarok-clanker a3b948e4a9 Confirm fn_21086 (RenderObjectState::Reset)
Batch #15793 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_21086 RenderObjectState::Reset: logic confirmed by peer review (already on main)

Peer-reviewed-by: Yommy, secret, KWDev
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-10 10:13:06 +00:00

41 lines
867 B
C++

#ifndef RAGNAROK_SOURCE_CONTENTS_INSTANTVAR_H
#define RAGNAROK_SOURCE_CONTENTS_INSTANTVAR_H
#include <cstdint>
#include <map>
class CInstantVar {
public:
CInstantVar() = default;
virtual ~CInstantVar();
void Set(int key, std::int64_t value);
std::int64_t Get(int key) const;
void Clear();
std::map<int, std::int64_t>& Values();
const std::map<int, std::int64_t>& Values() const;
private:
friend class CSession;
/* 0004 */ std::map<int, std::int64_t> m_values;
};
// INLINED
inline void CInstantVar::Clear() {
this->m_values.clear();
}
// INLINED
inline std::map<int, std::int64_t>& CInstantVar::Values() {
return this->m_values;
}
// INLINED
inline const std::map<int, std::int64_t>& CInstantVar::Values() const {
return this->m_values;
}
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(CInstantVar) == 12);
#endif
#endif