Equals method in OpenSettingsArgs contains extra semicolon #23656

Open
opened 2026-01-31 08:48:25 +00:00 by claunia · 0 comments
Owner

Originally created by @Ujjansh05 on GitHub (Oct 2, 2025).

In ActionArgs.h, the Equals method of the OpenSettingsArgs class contains an extra semicolon after the closing brace:

Image
bool Equals(const IActionArgs& other)
{
    auto otherAsUs = other.try_as<OpenSettingsArgs>();
    if (otherAsUs)
    {
        return otherAsUs->_Target == _Target;
    }
    return false;
};

While syntactically allowed, this is considered poor style and is flagged in the documentation. It should be removed for clarity and consistency with WinRT/C++ coding conventions.

bool Equals(const IActionArgs& other)
{
    auto otherAsUs = other.try_as<OpenSettingsArgs>();
    if (otherAsUs)
    {
        return otherAsUs->_Target == _Target;
    }
    return false;
}

Impact
Minor stylistic issue, but fixing it improves code readability and maintains consistent coding standards.

Originally created by @Ujjansh05 on GitHub (Oct 2, 2025). In ActionArgs.h, the Equals method of the OpenSettingsArgs class contains an extra semicolon after the closing brace: <img width="1828" height="960" alt="Image" src="https://github.com/user-attachments/assets/0c6db4d3-500d-4b4d-9576-ee7b48735aec" /> ``` bool Equals(const IActionArgs& other) { auto otherAsUs = other.try_as<OpenSettingsArgs>(); if (otherAsUs) { return otherAsUs->_Target == _Target; } return false; }; ``` While syntactically allowed, this is considered poor style and is flagged in the documentation. It should be removed for clarity and consistency with WinRT/C++ coding conventions. ``` bool Equals(const IActionArgs& other) { auto otherAsUs = other.try_as<OpenSettingsArgs>(); if (otherAsUs) { return otherAsUs->_Target == _Target; } return false; } ``` Impact Minor stylistic issue, but fixing it improves code readability and maintains consistent coding standards.
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 08:48:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23656