Skip to content

Commit

Permalink
Rearrange variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AZero13 authored Jul 12, 2021
1 parent e591573 commit 9d10265
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stl/inc/xstring
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct _Char_traits { // properties of a string or stream element
bool _Loop_forward = true;

for (const _Elem* _Src = _First2; _Src != _First2 + _Count; ++_Src) {
if (_First1 == _Src) {
if (_Src == _First1) {
_Loop_forward = false;
break;
}
Expand Down Expand Up @@ -143,8 +143,8 @@ struct _Char_traits { // properties of a string or stream element
_NODISCARD static _CONSTEXPR17 size_t length(_In_z_ const _Elem* _First) noexcept /* strengthened */ {
// find length of null-terminated sequence
size_t _Count = 0;
for (; *_First != _Elem(); ++_Count) {
++_First;
for (; *_First != _Elem(); ++_First) {
++_Count;
}

return _Count;
Expand Down

1 comment on commit 9d10265

@miscco
Copy link
Contributor

@miscco miscco commented on 9d10265 Jul 12, 2021

Choose a reason for hiding this comment

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

I would strongly advise against such changes. Needlessly changing code for purely aesthetically reasons is unlikely to be accepted and also significantly increases the difficulty for the review.

Please limit this PR to functional code changes. You can always provide a separate cleanup PR if you feel like it.

Please sign in to comment.