chore: moved GDENUM and __VA_ARGS__STRING to macros.h
This commit is contained in:
parent
a050913c30
commit
7917edb4d0
2 changed files with 9 additions and 8 deletions
|
|
@ -17,4 +17,12 @@
|
|||
ADD_PROPERTY(PropertyInfo(m_type, #m_property), "set_" #m_property, \
|
||||
"get_" #m_property)
|
||||
|
||||
#define __VA_ARGS__STRING(...) String(#__VA_ARGS__)
|
||||
|
||||
#define GDENUM(M_Name, ...) \
|
||||
enum M_Name { __VA_ARGS__ }; \
|
||||
static String M_Name##_hint() { \
|
||||
return __VA_ARGS__STRING(__VA_ARGS__); \
|
||||
}
|
||||
|
||||
#endif // !GODOT_EXTRA_MACROS_H
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "macros.h"
|
||||
#include <core/object/class_db.h>
|
||||
#include <core/object/object.h>
|
||||
#include <zmq.h>
|
||||
|
|
@ -8,14 +9,6 @@
|
|||
#include <zmq.hpp>
|
||||
#include <zmq_addon.hpp>
|
||||
|
||||
#define __VA_ARGS__STRING(...) String(#__VA_ARGS__)
|
||||
|
||||
#define GDENUM(M_Name, ...) \
|
||||
enum M_Name { __VA_ARGS__ }; \
|
||||
static String M_Name##_hint() { \
|
||||
return __VA_ARGS__STRING(__VA_ARGS__); \
|
||||
}
|
||||
|
||||
class NetworkData : Object {
|
||||
GDCLASS(NetworkData, Object);
|
||||
static void _bind_methods();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue