Skip to content

Commit 8c9b74e

Browse files
Change ERROR to ERROR_TYPE to remove compile errors
1 parent d75c292 commit 8c9b74e

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

godotcord_user_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void GodotcordUserManager::_bind_methods() {
2222
BIND_ENUM_CONSTANT(HYPE_SQUAD_HOUSE_2);
2323
BIND_ENUM_CONSTANT(HYPE_SQUAD_HOUSE_3);
2424

25-
BIND_ENUM_CONSTANT(ERROR);
25+
BIND_ENUM_CONSTANT(ERROR_TYPE);
2626
BIND_ENUM_CONSTANT(NONE);
2727
BIND_ENUM_CONSTANT(TIER_1);
2828
BIND_ENUM_CONSTANT(TIER_2);
@@ -69,7 +69,7 @@ Ref<GodotcordUser> GodotcordUserManager::get_current_user() {
6969
GodotcordUserManager::PremiumType GodotcordUserManager::get_current_user_premium_type() {
7070
discord::PremiumType premium_type;
7171
discord::Result result = Godotcord::get_singleton()->get_core()->UserManager().GetCurrentUserPremiumType(&premium_type);
72-
ERR_FAIL_COND_V_MSG(result != discord::Result::Ok, PremiumType::ERROR, "An error occured while fetching the users premium type");
72+
ERR_FAIL_COND_V_MSG(result != discord::Result::Ok, PremiumType::ERROR_TYPE, "An error occured while fetching the users premium type");
7373

7474
return (PremiumType)premium_type;
7575
}

godotcord_user_manager.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
#ifndef GODOTCORD_USER_MANAGER_H
22
#define GODOTCORD_USER_MANAGER_H
33

4-
#ifdef ERROR
5-
#undef ERROR
6-
#endif
7-
#ifdef NONE
8-
#undef NONE
9-
#endif
10-
114
#include <godot_cpp/classes/object.hpp>
125

136
#include "godotcord.h"
@@ -26,7 +19,7 @@ class GodotcordUserManager : public Object {
2619
};
2720

2821
enum PremiumType {
29-
ERROR = -1,
22+
ERROR_TYPE = -1,
3023
NONE = 0,
3124
TIER_1,
3225
TIER_2

0 commit comments

Comments
 (0)