Fix STR_String Capitalize on non Win32
Harmless since its not used, but good to fix.
This commit is contained in:

committed by
Campbell Barton

parent
741c4082d8
commit
820709c14d
@@ -545,9 +545,9 @@ STR_String& STR_String::Capitalize()
|
||||
if (this->m_len > 1) _strlwr(this->m_data + 1);
|
||||
#else
|
||||
if (this->m_len > 0)
|
||||
this->m_data[0] = (this->m_data[0] >= 'A' && this->m_data[0] <= 'A') ? this->m_data[0] + 'a' - 'A' : this->m_data[0];
|
||||
this->m_data[0] = (this->m_data[0] >= 'a' && this->m_data[0] <= 'z') ? this->m_data[0] + 'A' - 'a' : this->m_data[0];
|
||||
for (int i = 1; i < this->m_len; i++)
|
||||
this->m_data[i] = (this->m_data[i] >= 'a' && this->m_data[i] <= 'z') ? this->m_data[i] + 'A' - 'a' : this->m_data[i];
|
||||
this->m_data[i] = (this->m_data[i] >= 'A' && this->m_data[i] <= 'Z') ? this->m_data[i] + 'a' - 'A' : this->m_data[i];
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user