mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0023947: Eliminate trivial compiler warnings in MSVC++ with warning level 4
Fix first subset of warnings (about 100) - while(1) and similar constructs replaced by for(;;) - some uninitialized variables corrected Got rid of Warning C4189: local variable is initialised but not referenced Corrected mistakes after getting rid of C4189 compiler warning Corrected some mistakes that led to compiling errors Fixed test case because of improvement message - removed unnecessary TODO. Small fix: tabs have been replaced with whitespaces. Added TODO for Windows platform removed last TODO Corrected mistakes, returned some #ifdef DEB code, fixed test case . Restoring a few places which have been modified too much Small grammar fix Deleted unnecessary puts in bugs/end
This commit is contained in:
@@ -424,8 +424,8 @@ void TCollection_AsciiString::AssignCat(const TCollection_AsciiString& other)
|
||||
void TCollection_AsciiString::Capitalize()
|
||||
{
|
||||
for (int i=0; i < mylength; i++) {
|
||||
if ( i==0 ) mystring[i] = toupper(mystring[i]);
|
||||
else mystring[i] = tolower(mystring[i]);
|
||||
if ( i==0 ) mystring[i] = ::UpperCase(mystring[i]);
|
||||
else mystring[i] = ::LowerCase(mystring[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,9 +457,9 @@ void TCollection_AsciiString::ChangeAll(const Standard_Character aChar,
|
||||
if (mystring[i] == aChar) mystring[i] = NewChar;
|
||||
}
|
||||
else{
|
||||
Standard_Character anUpperChar = toupper(aChar);
|
||||
Standard_Character anUpperChar = ::UpperCase(aChar);
|
||||
for (int i=0; i < mylength; i++)
|
||||
if (toupper(mystring[i]) == anUpperChar) mystring[i] = NewChar;
|
||||
if (::UpperCase(mystring[i]) == anUpperChar) mystring[i] = NewChar;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1138,7 +1138,7 @@ Standard_Integer TCollection_AsciiString::Location
|
||||
void TCollection_AsciiString::LowerCase()
|
||||
{
|
||||
for (int i=0; i < mylength; i++)
|
||||
mystring[i] = tolower(mystring[i]);
|
||||
mystring[i] = ::LowerCase(mystring[i]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@@ -1240,9 +1240,9 @@ void TCollection_AsciiString::RemoveAll(const Standard_Character what,
|
||||
if (mystring[i] != what) mystring[c++] = mystring[i];
|
||||
}
|
||||
else {
|
||||
Standard_Character upperwhat = toupper(what);
|
||||
Standard_Character upperwhat = ::UpperCase(what);
|
||||
for (int i=0; i < mylength; i++) {
|
||||
if (toupper(mystring[i]) != upperwhat) mystring[c++] = mystring[i];
|
||||
if (::UpperCase(mystring[i]) != upperwhat) mystring[c++] = mystring[i];
|
||||
}
|
||||
}
|
||||
mylength = c;
|
||||
@@ -1831,7 +1831,7 @@ void TCollection_AsciiString::Trunc(const Standard_Integer ahowmany)
|
||||
void TCollection_AsciiString::UpperCase()
|
||||
{
|
||||
for (int i=0; i < mylength; i++)
|
||||
mystring[i] = toupper(mystring[i]);
|
||||
mystring[i] = ::UpperCase(mystring[i]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user