diff options
author | Einar Johan Trøan Sømåen | 2012-07-26 22:20:55 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-26 22:20:55 +0200 |
commit | 3a49f2bad407787ef65d04c5f9ae423485629b41 (patch) | |
tree | f7ceed0ac885724b5569302bc23ba3f027705fb1 /engines/wintermute/utils | |
parent | 496a3938c451683845e73fa9b2cba20dadddfe21 (diff) | |
download | scummvm-rg350-3a49f2bad407787ef65d04c5f9ae423485629b41.tar.gz scummvm-rg350-3a49f2bad407787ef65d04c5f9ae423485629b41.tar.bz2 scummvm-rg350-3a49f2bad407787ef65d04c5f9ae423485629b41.zip |
WINTERMUTE: More variable/function renaming VarName->varName
Diffstat (limited to 'engines/wintermute/utils')
-rw-r--r-- | engines/wintermute/utils/string_util.cpp | 16 | ||||
-rw-r--r-- | engines/wintermute/utils/utils.cpp | 20 | ||||
-rw-r--r-- | engines/wintermute/utils/utils.h | 2 |
3 files changed, 19 insertions, 19 deletions
diff --git a/engines/wintermute/utils/string_util.cpp b/engines/wintermute/utils/string_util.cpp index f864a8480a..92f6fb202b 100644 --- a/engines/wintermute/utils/string_util.cpp +++ b/engines/wintermute/utils/string_util.cpp @@ -103,8 +103,8 @@ Utf8String StringUtil::wideToUtf8(const WideString &WideStr) { /* size_t WideSize = WideStr.length();
if (sizeof(wchar_t) == 2) {
- size_t Utf8Size = 3 * WideSize + 1;
- char *Utf8StringNative = new char[Utf8Size];
+ size_t utf8Size = 3 * WideSize + 1;
+ char *utf8StringNative = new char[Utf8Size];
const UTF16 *SourceStart = reinterpret_cast<const UTF16 *>(WideStr.c_str());
const UTF16 *SourceEnd = SourceStart + WideSize;
@@ -122,8 +122,8 @@ Utf8String StringUtil::wideToUtf8(const WideString &WideStr) { delete[] Utf8StringNative;
return ResultString;
} else if (sizeof(wchar_t) == 4) {
- size_t Utf8Size = 4 * WideSize + 1;
- char *Utf8StringNative = new char[Utf8Size];
+ size_t utf8Size = 4 * WideSize + 1;
+ char *utf8StringNative = new char[Utf8Size];
const UTF32 *SourceStart = reinterpret_cast<const UTF32 *>(WideStr.c_str());
const UTF32 *SourceEnd = SourceStart + WideSize;
@@ -175,7 +175,7 @@ WideString StringUtil::ansiToWide(const AnsiString &str) { // using default os locale!
/* setlocale(LC_CTYPE, "");
- size_t WideSize = mbstowcs(NULL, str.c_str(), 0) + 1;
+ size_t wideSize = mbstowcs(NULL, str.c_str(), 0) + 1;
wchar_t *wstr = new wchar_t[WideSize];
mbstowcs(wstr, str.c_str(), WideSize);
WideString ResultString(wstr);
@@ -194,7 +194,7 @@ AnsiString StringUtil::wideToAnsi(const WideString &wstr) { warning("StringUtil::WideToAnsi - WideString not supported yet");
}
/* setlocale(LC_CTYPE, "");
- size_t WideSize = wcstombs(NULL, wstr.c_str(), 0) + 1;
+ size_t wideSize = wcstombs(NULL, wstr.c_str(), 0) + 1;
char *str = new char[WideSize];
wcstombs(str, wstr.c_str(), WideSize);
AnsiString ResultString(str);
@@ -260,8 +260,8 @@ bool StringUtil::endsWith(const AnsiString &str, const AnsiString &pattern, bool }
//////////////////////////////////////////////////////////////////////////
-bool StringUtil::isUtf8BOM(const byte *Buffer, uint32 BufferSize) {
- if (BufferSize > 3 && Buffer[0] == 0xEF && Buffer[1] == 0xBB && Buffer[2] == 0xBF) {
+bool StringUtil::isUtf8BOM(const byte *buffer, uint32 bufferSize) {
+ if (bufferSize > 3 && buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF) {
return true;
} else {
return false;
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp index 3336cf63e2..3050a36263 100644 --- a/engines/wintermute/utils/utils.cpp +++ b/engines/wintermute/utils/utils.cpp @@ -40,9 +40,9 @@ static inline unsigned Sqr(int x) { // Swap - swaps two integers
//////////////////////////////////////////////////////////////////////////////////
void BaseUtils::swap(int *a, int *b) {
- int Temp = *a;
+ int temp = *a;
*a = *b;
- *b = Temp;
+ *b = temp;
}
@@ -150,11 +150,11 @@ float BaseUtils::randomFloat(float from, float to) { }
//////////////////////////////////////////////////////////////////////////
-float BaseUtils::randomAngle(float From, float To) {
- while (To < From) {
- To += 360;
+float BaseUtils::randomAngle(float from, float to) {
+ while (to < from) {
+ to += 360;
}
- return normalizeAngle(randomFloat(From, To));
+ return normalizeAngle(randomFloat(from, to));
}
//////////////////////////////////////////////////////////////////////////
@@ -217,10 +217,10 @@ bool BaseUtils::matchesPattern(const char *pattern, const char *string) { //////////////////////////////////////////////////////////////////////////
-void BaseUtils::RGBtoHSL(uint32 RGBColor, byte *outH, byte *outS, byte *outL) {
- float varR = (RGBCOLGetR(RGBColor) / 255.0f);
- float varG = (RGBCOLGetG(RGBColor) / 255.0f);
- float varB = (RGBCOLGetB(RGBColor) / 255.0f);
+void BaseUtils::RGBtoHSL(uint32 rgbColor, byte *outH, byte *outS, byte *outL) {
+ float varR = (RGBCOLGetR(rgbColor) / 255.0f);
+ float varG = (RGBCOLGetG(rgbColor) / 255.0f);
+ float varB = (RGBCOLGetB(rgbColor) / 255.0f);
//Min. value of RGB
float varMin = MIN(varR, varG);
diff --git a/engines/wintermute/utils/utils.h b/engines/wintermute/utils/utils.h index 3cb01c57b8..5b3ce65470 100644 --- a/engines/wintermute/utils/utils.h +++ b/engines/wintermute/utils/utils.h @@ -55,7 +55,7 @@ public: static bool matchesPattern(const char *pattern, const char *string);
- static void RGBtoHSL(uint32 RGBColor, byte *OutH, byte *OutS, byte *OutL);
+ static void RGBtoHSL(uint32 rgbColor, byte *outH, byte *outS, byte *outL);
static uint32 HSLtoRGB(byte H, byte S, byte L);
private:
|