[Scummvm-git-logs] scummvm master -> 29cd6a04760c2c2bbe1a3d25d98a527b96ec23c0
ccawley2011
ccawley2011 at gmail.com
Sun Feb 7 18:00:13 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
29cd6a0476 AGS: Fix variable shadowing warning
Commit: 29cd6a04760c2c2bbe1a3d25d98a527b96ec23c0
https://github.com/scummvm/scummvm/commit/29cd6a04760c2c2bbe1a3d25d98a527b96ec23c0
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-02-07T18:00:00Z
Commit Message:
AGS: Fix variable shadowing warning
Changed paths:
engines/ags/lib/std/map.h
diff --git a/engines/ags/lib/std/map.h b/engines/ags/lib/std/map.h
index fec3fbc66e..65272ff704 100644
--- a/engines/ags/lib/std/map.h
+++ b/engines/ags/lib/std/map.h
@@ -84,18 +84,18 @@ public:
const_iterator lower_bound(const Key &theKey) const {
const_iterator first = this->begin();
const_iterator it;
- int count = _items.size(), step;
+ int count_ = _items.size(), step;
- while (count > 0) {
+ while (count_ > 0) {
it = first;
- step = count / 2;
+ step = count_ / 2;
it += step;
if (_comp(it->_key, theKey)) {
first = ++it;
- count -= step + 1;
+ count_ -= step + 1;
} else {
- count = step;
+ count_ = step;
}
}
@@ -105,18 +105,18 @@ public:
iterator lower_bound(const Key &theKey) {
iterator first = this->begin();
iterator it;
- int count = _items.size(), step;
+ int count_ = _items.size(), step;
- while (count > 0) {
+ while (count_ > 0) {
it = first;
- step = count / 2;
+ step = count_ / 2;
it += step;
if (_comp(it->_key, theKey)) {
first = ++it;
- count -= step + 1;
+ count_ -= step + 1;
} else {
- count = step;
+ count_ = step;
}
}
@@ -182,13 +182,13 @@ public:
* Returns the number of elements with a matching key
*/
size_t count(const Key &theKey) {
- int count = 0;
+ int count_ = 0;
for (iterator it = this->begin(); it != this->end(); ++it) {
if (it->_key == theKey)
- ++count;
+ ++count_;
}
- return count;
+ return count_;
}
};
More information about the Scummvm-git-logs
mailing list