Code style adjustment

This commit is contained in:
Vasili Galka 2018-03-13 14:46:39 +02:00
parent 1c30083936
commit d37348ee06
2 changed files with 16 additions and 18 deletions

View File

@ -283,8 +283,7 @@ FMT_FUNC internal::utf8_to_utf16::utf8_to_utf16(string_view s) {
if (s.size() > INT_MAX || s.data() == nullptr) if (s.size() > INT_MAX || s.data() == nullptr)
FMT_THROW(windows_error(ERROR_INVALID_PARAMETER, ERROR_MSG)); FMT_THROW(windows_error(ERROR_INVALID_PARAMETER, ERROR_MSG));
int s_size = static_cast<int>(s.size()); int s_size = static_cast<int>(s.size());
if (s_size == 0) // MultiByteToWideChar does not support zero length, handle separately if (s_size == 0) { // MultiByteToWideChar does not support zero length, handle separately
{
buffer_.resize(1); buffer_.resize(1);
buffer_[0] = 0; buffer_[0] = 0;
return; return;
@ -313,8 +312,7 @@ FMT_FUNC int internal::utf16_to_utf8::convert(wstring_view s) {
if (s.size() > INT_MAX || s.data() == nullptr) if (s.size() > INT_MAX || s.data() == nullptr)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
int s_size = static_cast<int>(s.size()); int s_size = static_cast<int>(s.size());
if (s_size == 0) // MultiByteToWideChar does not support zero length, handle separately if (s_size == 0) { // MultiByteToWideChar does not support zero length, handle separately
{
buffer_.resize(1); buffer_.resize(1);
buffer_[0] = 0; buffer_[0] = 0;
return 0; return 0;