forked from Green-Sky/tomato
refactor file from messages to objects (#27)
* part 1 move files from messages to objects tomato - did not touch chat_gui yet, but image loaders and other stuff * part 1.1 * part 2, mostly chatgui - also ngcft1 behind the scenes * part 3 - port over rest, except for avatar_manager, which is effectivly disabled * fix surface missused causing bmp loader to crash * fixing small issues and small forward refactor
This commit is contained in:
26
src/os_comps_id.inl
Normal file
26
src/os_comps_id.inl
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "./os_comps.hpp"
|
||||
|
||||
#include <entt/core/type_info.hpp>
|
||||
|
||||
// TODO: move more central
|
||||
#define DEFINE_COMP_ID(x) \
|
||||
template<> \
|
||||
constexpr entt::id_type entt::type_hash<x>::value() noexcept { \
|
||||
using namespace entt::literals; \
|
||||
return #x##_hs; \
|
||||
} \
|
||||
template<> \
|
||||
constexpr std::string_view entt::type_name<x>::value() noexcept { \
|
||||
return #x; \
|
||||
}
|
||||
|
||||
// cross compile(r) stable ids
|
||||
|
||||
DEFINE_COMP_ID(ObjComp::F::RemoteHaveBitset)
|
||||
|
||||
DEFINE_COMP_ID(ObjComp::Ephemeral::File::TransferStatsSeparated)
|
||||
|
||||
#undef DEFINE_COMP_ID
|
||||
|
Reference in New Issue
Block a user