зеркало из https://github.com/microsoft/STL.git
Cleanups: Very minor logic changes (#3531)
This commit is contained in:
Родитель
e7aa390029
Коммит
1e066dc1b7
|
@ -623,12 +623,11 @@ _NODISCARD constexpr common_type_t<_Mt, _Nt> gcd(const _Mt _Mx, const _Nt _Nx) n
|
||||||
|
|
||||||
_Nx_magnitude -= _Mx_magnitude;
|
_Nx_magnitude -= _Mx_magnitude;
|
||||||
if (_Nx_magnitude == 0U) {
|
if (_Nx_magnitude == 0U) {
|
||||||
break;
|
return static_cast<_Common>(_Mx_magnitude << _Common_factors_of_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
_Nx_trailing_zeroes = static_cast<unsigned long>(_Countr_zero_impl(_Nx_magnitude));
|
_Nx_trailing_zeroes = static_cast<unsigned long>(_Countr_zero_impl(_Nx_magnitude));
|
||||||
}
|
}
|
||||||
return static_cast<_Common>(_Mx_magnitude << _Common_factors_of_2);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace {
|
||||||
};
|
};
|
||||||
|
|
||||||
FILE* fp = nullptr;
|
FILE* fp = nullptr;
|
||||||
ios_base::openmode atendflag = mode & ios_base::ate;
|
const bool at_end = (mode & ios_base::ate) != 0;
|
||||||
|
|
||||||
if (mode & ios_base::_Nocreate) {
|
if (mode & ios_base::_Nocreate) {
|
||||||
mode |= ios_base::in; // file must exist
|
mode |= ios_base::in; // file must exist
|
||||||
|
@ -75,7 +75,7 @@ namespace {
|
||||||
return nullptr; // open failed
|
return nullptr; // open failed
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atendflag && fseek(fp, 0, SEEK_END) != 0) {
|
if (at_end && fseek(fp, 0, SEEK_END) != 0) {
|
||||||
fclose(fp); // can't position at end
|
fclose(fp); // can't position at end
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -306,7 +306,6 @@ namespace Concurrency {
|
||||||
case APTTYPE_STA:
|
case APTTYPE_STA:
|
||||||
case APTTYPE_MAINSTA:
|
case APTTYPE_MAINSTA:
|
||||||
return true;
|
return true;
|
||||||
break;
|
|
||||||
case APTTYPE_NA:
|
case APTTYPE_NA:
|
||||||
switch (_AptTypeQualifier) {
|
switch (_AptTypeQualifier) {
|
||||||
// A thread executing in a neutral apartment is either STA or MTA. To find out if this thread is
|
// A thread executing in a neutral apartment is either STA or MTA. To find out if this thread is
|
||||||
|
@ -316,7 +315,6 @@ namespace Concurrency {
|
||||||
case APTTYPEQUALIFIER_NA_ON_STA:
|
case APTTYPEQUALIFIER_NA_ON_STA:
|
||||||
case APTTYPEQUALIFIER_NA_ON_MAINSTA:
|
case APTTYPEQUALIFIER_NA_ON_MAINSTA:
|
||||||
return true;
|
return true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче