-
Notifications
You must be signed in to change notification settings - Fork 0
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
External arguments validation #1
Labels
enhancement
New feature or request
Comments
Example: automatic nullpointer checks Transform code like this void Npc_DoTakeItem(oCNpc* t_npc, oCItem* t_item)
{
if (!t_npc || !t_item)
{
return;
}
t_npc->DoTakeVob(t_item);
} Into void Npc_DoTakeItem(oCNpc* t_npc, oCItem* t_item)
{
t_npc->DoTakeVob(t_item);
} |
I also need to add checks of the instance types, because daedalus does not distinguish them. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adding arguments validation rules might be useful and can remove a lot of ifs in the externals code. e.g. we can eliminate checks if pointer is nullptr.
It must also allow you to make custom rules because sometimes you want to have nullpointers or some any different unvalid states.
The text was updated successfully, but these errors were encountered: