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

More readable methods std::string and fix repeat calling methods #19028

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GermanAizek
Copy link
Contributor

I think it's a good refactoring that doesn't break and reduces size code functions.

@@ -58,7 +58,7 @@ enum class NoticeLevel {
class NoticeView : public UI::InertView {
public:
NoticeView(NoticeLevel level, std::string_view text, std::string_view detailsText, UI::LayoutParams *layoutParams = 0)
: InertView(layoutParams), level_(level), text_(text), detailsText_(detailsText), iconName_("") {}
: InertView(layoutParams), level_(level), text_(text), detailsText_(detailsText), iconName_() {}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can even skip iconName_ here, it defaults to empty

@@ -406,15 +406,16 @@ class OpenGLContext : public DrawContext {
stencilWriteMask_ = writeMask;
stencilCompareMask_ = compareMask;
// Do we need to update on the fly here?
const auto depthStencil = curPipeline_->depthStencil;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think whenever it's not too hard, let's be explicit about the type for these instead of using auto. Clearer and doesn't really take up a lot of code space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants