Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ERR_FAIL_* macros where possible #184

Merged
merged 1 commit into from
Dec 29, 2023
Merged

Use ERR_FAIL_* macros where possible #184

merged 1 commit into from
Dec 29, 2023

Conversation

Hop311
Copy link
Contributor

@Hop311 Hop311 commented Dec 28, 2023

  • Replace most instances of return nullptr; or return FAILED;, and accompanying UtilityFunctions::push_error messages, with ERR_FAIL_* macros. Most remaining uses of FAILED and UtilityFunctions::push_error are in contents where a local error variable is set to FAILED, rather than returning immediately, for example:
	if (!dataloader.set_roots(roots)) {
		Logger::error("Failed to set dataloader roots!");
		err = FAILED;
	}
  • Changed some String and StringName arguments to use const references, and changed String variables to StringNames when they will be used to fill a StringName function argument.

@Spartan322 Spartan322 added the enhancement New feature or request label Dec 28, 2023
@Hop311 Hop311 merged commit 62b0e39 into master Dec 29, 2023
16 checks passed
@Hop311 Hop311 deleted the error-macros branch December 29, 2023 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants