#2 reduce scope of pointer variables

Closed
opened 8 months ago by cethyel · 3 comments
cethyel commented 8 months ago

According to cppcheck the scope of ‘item’ and ‘skin’ in “yakuake/yakuake/src/skin_settings.cpp” could be reduced:

[skin_settings.cpp:151]: (style) The scope of the variable ‘item’ can be reduced.

[skin_settings.cpp:418]: (style) The scope of the variable ‘skin’ can be reduced.

I suggest ‘item’ to be moved in the “while (it2.current())” scope.

and

‘skin’ to be moved in the while “(it.current())” scope.

What do you think about?

According to cppcheck the scope of 'item' and 'skin' in "yakuake/yakuake/src/skin_settings.cpp" could be reduced: [skin_settings.cpp:151]: (style) The scope of the variable 'item' can be reduced. [skin_settings.cpp:418]: (style) The scope of the variable 'skin' can be reduced. I suggest 'item' to be moved in the "while (it2.current())" scope. and 'skin' to be moved in the while "(it.current())" scope. What do you think about?
MicheleC commented 8 months ago
Owner

Yes, it sounds like a good idea. Please create PR and we will merge, so commit is with your name :smile:

Yes, it sounds like a good idea. Please create PR and we will merge, so commit is with your name :smile:
MicheleC commented 8 months ago
Owner

one more thing: in the commit message please make sure to add something like “This resolves issue#2”, so that gitea can pick it up and automatically link issue and commit in code.

one more thing: in the commit message please make sure to add something like "This resolves issue#2", so that gitea can pick it up and automatically link issue and commit in code.
MicheleC added this to the R14.0.6 release milestone 8 months ago
MicheleC commented 8 months ago
Owner

Resolved by PR #3

Resolved by PR https://mirror.git.trinitydesktop.org/gitea/TDE/yakuake/pulls/3
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.