Rename or refactor macros to avoid leading underscores

These are not used consistently and some can conflict with
system-specific defines.  While here, also delete some unused macros.
This commit is contained in:
Omar Polo 2021-08-09 19:28:08 +02:00
parent 8fc0dd9997
commit bd448e5535
12 changed files with 95 additions and 94 deletions

View file

@ -38,11 +38,11 @@
#include "webrtc_peer_connection_extension.h"
void register_webrtc_types() {
#define _SET_HINT(NAME, _VAL_, _MAX_) \
GLOBAL_DEF(NAME, _VAL_); \
#define SET_HINT(NAME, _VAL_, _MAX_) \
GLOBAL_DEF(NAME, _VAL_); \
ProjectSettings::get_singleton()->set_custom_property_info(NAME, PropertyInfo(Variant::INT, NAME, PROPERTY_HINT_RANGE, "2," #_MAX_ ",1,or_greater"));
_SET_HINT(WRTC_IN_BUF, 64, 4096);
SET_HINT(WRTC_IN_BUF, 64, 4096);
ClassDB::register_custom_instance_class<WebRTCPeerConnection>();
GDREGISTER_CLASS(WebRTCPeerConnectionExtension);
@ -51,6 +51,8 @@ void register_webrtc_types() {
GDREGISTER_CLASS(WebRTCDataChannelExtension);
GDREGISTER_CLASS(WebRTCMultiplayerPeer);
#undef SET_HINT
}
void unregister_webrtc_types() {}