Skip to content

Commit aca9fd9

Browse files
Remove not needed macros.
1 parent 11c1418 commit aca9fd9

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed

Source/PubnubLibrary/Private/PubnubInternalMacros.h

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -108,24 +108,6 @@
108108
} \
109109
} while (false)
110110

111-
/**
112-
* Verifies that a valid Pubnub user ID has been set before continuing.
113-
*
114-
* If the user ID is not set, this macro will:
115-
* - Log an error message to the output log
116-
* - Invoke the provided delegate with a failure result and optional additional arguments
117-
* - Immediately return from the calling function
118-
*/
119-
#define PUBNUB_ENSURE_USER_ID_IS_SET(Delegate, ...) \
120-
do { \
121-
if (!IsUserIDSet) \
122-
{ \
123-
PubnubError(FString::Printf(TEXT("[%s]: Pubnub user ID is not set. Aborting operation."), *UPubnubUtilities::GetNameFromFunctionMacro(ANSI_TO_TCHAR(__FUNCTION__)))); \
124-
UPubnubUtilities::CallPubnubDelegateWithInvalidArgumentResult(Delegate, TEXT("Pubnub user ID is not set."), ##__VA_ARGS__); \
125-
return; \
126-
} \
127-
} while (false)
128-
129111
/**
130112
* Verifies that a valid Pubnub user ID has been set before continuing.
131113
*
@@ -143,24 +125,6 @@
143125
} \
144126
} while (false)
145127

146-
/**
147-
* Verifies that provided condition is met.
148-
*
149-
* If the condition is not met, this macro will:
150-
* - Log an error message to the output log
151-
* - Invoke the provided delegate with a failure result and optional additional arguments
152-
* - Immediately return from the calling function
153-
*/
154-
#define PUBNUB_ENSURE_CONDITION(Condition, ErrorMessage, Delegate, ...) \
155-
do { \
156-
if (!(Condition)) \
157-
{ \
158-
PubnubError(FString::Printf(TEXT("[%s]: %s Aborting operation."), *UPubnubUtilities::GetNameFromFunctionMacro(ANSI_TO_TCHAR(__FUNCTION__)), ErrorMessage)); \
159-
UPubnubUtilities::CallPubnubDelegateWithInvalidArgumentResult(Delegate, ErrorMessage, ##__VA_ARGS__); \
160-
return; \
161-
} \
162-
} while (false)
163-
164128
/**
165129
* Verifies that the provided condition is met before continuing.
166130
*
@@ -420,29 +384,6 @@
420384
} \
421385
} while (false)
422386

423-
/**
424-
* Validates that the provided field (e.g., channel name, message, metadata) is not empty.
425-
*
426-
* If the field is empty, this macro will:
427-
* - Log a warning message indicating the missing field
428-
* - Call the specified delegate with a failure result including the field name in the error message
429-
* - Immediately return from the calling function
430-
*
431-
* Usage: Use to guard against invalid or missing user input before executing core logic.
432-
*
433-
* @param Field The field to validate (must implement IsEmpty())
434-
* @param Delegate The delegate to call on failure
435-
* @param ... Additional arguments to pass to the delegate (after the result)
436-
*/
437-
#define PUBNUB_ENSURE_FIELD_NOT_EMPTY(Field, Delegate, ...) \
438-
do { \
439-
if (Field.IsEmpty()) \
440-
{ \
441-
PubnubError(FString::Printf(TEXT("[%s]: %s field can't be empty. Aborting operation."), *UPubnubUtilities::GetNameFromFunctionMacro(ANSI_TO_TCHAR(__FUNCTION__)), TEXT(#Field)), EPubnubErrorType::PET_Warning); \
442-
UPubnubUtilities::CallPubnubDelegateWithInvalidArgumentResult(Delegate, FString::Printf(TEXT("Missing required input: '%s' (field is empty). Operation aborted."), TEXT(#Field)), ##__VA_ARGS__); \
443-
return; \
444-
} \
445-
} while (false)
446387

447388
/**
448389
* Validates that the provided field (e.g., channel name, message, metadata) is not empty.

0 commit comments

Comments
 (0)