[Scummvm-cvs-logs] scummvm master -> 35186ae5b008830d057fb15fc0195e22cce23fbd
sev-
sev at scummvm.org
Sat May 28 17:21:10 CEST 2016
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8fc736fb2d GRAPHICS: Fix warnings
31913eee17 COMMON: Fix warning about shadowing class members
35186ae5b0 SHERLOCK: Fix warnings
Commit: 8fc736fb2dc676c9b25100b24e96dfb4d73c1a00
https://github.com/scummvm/scummvm/commit/8fc736fb2dc676c9b25100b24e96dfb4d73c1a00
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-28T17:17:00+02:00
Commit Message:
GRAPHICS: Fix warnings
Changed paths:
graphics/nine_patch.cpp
diff --git a/graphics/nine_patch.cpp b/graphics/nine_patch.cpp
index 20e9e36..fea0d8a 100644
--- a/graphics/nine_patch.cpp
+++ b/graphics/nine_patch.cpp
@@ -60,7 +60,7 @@ NinePatchSide::~NinePatchSide() {
bool NinePatchSide::init(Graphics::TransparentSurface *bmp, bool vertical) {
const int len = vertical ? bmp->h : bmp->w;
- uint i;
+ int i;
int s, t, n, z;
_m.clear();
@@ -109,7 +109,7 @@ bool NinePatchSide::init(Graphics::TransparentSurface *bmp, bool vertical) {
}
void NinePatchSide::calcOffsets(int len) {
- int i, j;
+ uint i, j;
int dest_offset = 0;
int remaining_stretch = len - _fix;
Commit: 31913eee17dea5a5baad1d4927dd723e22afd097
https://github.com/scummvm/scummvm/commit/31913eee17dea5a5baad1d4927dd723e22afd097
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-28T17:18:17+02:00
Commit Message:
COMMON: Fix warning about shadowing class members
Changed paths:
common/str.cpp
diff --git a/common/str.cpp b/common/str.cpp
index c41e958..3ff49a9 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -144,7 +144,7 @@ void String::ensureCapacity(uint32 new_size, bool keep_old) {
// Allocate new storage
newStorage = new char[newCapacity];
assert(newStorage);
-
+
// Copy old data if needed, elsewise reset the new storage.
if (keep_old) {
@@ -447,12 +447,12 @@ void String::replace(uint32 pos, uint32 count, const char *str) {
replace(pos, count, str, 0, strlen(str));
}
-void String::replace(iterator begin, iterator end, const String &str) {
- replace(begin - _str, end - begin, str._str, 0, str._size);
+void String::replace(iterator begin_, iterator end_, const String &str) {
+ replace(begin_ - _str, end_ - begin_, str._str, 0, str._size);
}
-void String::replace(iterator begin, iterator end, const char *str) {
- replace(begin - _str, end - begin, str, 0, strlen(str));
+void String::replace(iterator begin_, iterator end_, const char *str) {
+ replace(begin_ - _str, end_ - begin_, str, 0, strlen(str));
}
void String::replace(uint32 posOri, uint32 countOri, const String &str,
@@ -472,21 +472,21 @@ void String::replace(uint32 posOri, uint32 countOri, const char *str,
_size = newSize;
// Push the old characters to the end of the string
- for (uint32 i = _size; i >= posOri + countDest; i--)
+ for (uint32 i = _size; i >= posOri + countDest; i--)
_str[i] = _str[i - offset];
} else if (countOri > countDest){
uint32 offset = countOri - countDest; ///< Number of positions that we have to pull back
// Pull the remainder string back
- for (uint32 i = posOri + countDest; i < _size; i++)
- _str[i] = _str[i + offset];
+ for (uint32 i = posOri + countDest; i < _size; i++)
+ _str[i] = _str[i + offset];
- _size -= offset;
+ _size -= offset;
}
// Copy the replaced part of the string
- for (uint32 i = 0; i < countDest; i++)
+ for (uint32 i = 0; i < countDest; i++)
_str[posOri + i] = str[posDest + i];
}
Commit: 35186ae5b008830d057fb15fc0195e22cce23fbd
https://github.com/scummvm/scummvm/commit/35186ae5b008830d057fb15fc0195e22cce23fbd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-28T17:20:50+02:00
Commit Message:
SHERLOCK: Fix warnings
Changed paths:
engines/sherlock/scalpel/scalpel_inventory.cpp
engines/sherlock/surface.h
diff --git a/engines/sherlock/scalpel/scalpel_inventory.cpp b/engines/sherlock/scalpel/scalpel_inventory.cpp
index 6eb8c2c..07659b4 100644
--- a/engines/sherlock/scalpel/scalpel_inventory.cpp
+++ b/engines/sherlock/scalpel/scalpel_inventory.cpp
@@ -109,7 +109,7 @@ void ScalpelInventory::drawInventory(InvNewMode mode) {
_invMode = (InvMode)((int)mode);
if (mode != PLAIN_INVENTORY) {
- assert(mode < sizeof(_hotkeysIndexed));
+ assert((uint)mode < sizeof(_hotkeysIndexed));
ui._oldKey = _hotkeysIndexed[mode];
} else {
ui._oldKey = -1;
diff --git a/engines/sherlock/surface.h b/engines/sherlock/surface.h
index 7e02d4c..807fbeb 100644
--- a/engines/sherlock/surface.h
+++ b/engines/sherlock/surface.h
@@ -45,7 +45,7 @@ public:
* Constructor
*/
BaseSurface();
-
+
/**
* Constructor
*/
@@ -95,7 +95,7 @@ public:
* Return the width of the surface
*/
virtual uint16 width() const { return this->w; }
-
+
/**
* Return the height of the surface
*/
@@ -105,7 +105,7 @@ public:
* Draws the given string into the back buffer using the images stored in _font
*/
void writeString(const Common::String &str, const Common::Point &pt, uint overrideColor);
-
+
/**
* Draws a fancy version of the given string at the given position
*/
@@ -121,7 +121,7 @@ protected:
virtual void addDirtyRect(const Common::Rect &r) {}
public:
Surface() : BaseSurface() {}
- Surface(int width, int height) : BaseSurface(width, height) {}
+ Surface(int w, int h) : BaseSurface(w, h) {}
};
} // End of namespace Sherlock
More information about the Scummvm-git-logs
mailing list