Skip to content

Unnecessary tests in Control_Bar_System #1021

Open
@xezon

Description

@xezon
WindowMsgHandledType Control_Bar_System(GameWindow *window, unsigned int message, unsigned int data_1, unsigned int data_2)
{
...
                while (str != nullptr && *str != '\0') {
                    msg->Append_Wide_Char_Arg(*str);
                    str++;
                }

Can be

WindowMsgHandledType Control_Bar_System(GameWindow *window, unsigned int message, unsigned int data_1, unsigned int data_2)
{
...
                if (str != nullptr)
                  while (*str != '\0') {
                    msg->Append_Wide_Char_Arg(*str);
                    str++;
                  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions