summaryrefslogtreecommitdiff
path: root/src/tool.cpp
diff options
context:
space:
mode:
authorDavid Jones <david@gogledd.cymru>2015-08-25 21:23:05 +0100
committerShadowNinja <shadowninja@minetest.net>2015-08-25 18:33:52 -0400
commit34b7a147dcf9831f3b4d81599c473ba01ff5da00 (patch)
treee7a95bf333d782ebde897b25070c5d997174e2f5 /src/tool.cpp
parent2480f2d06fe50295184a60d6659378f9a5d57065 (diff)
downloadminetest-34b7a147dcf9831f3b4d81599c473ba01ff5da00.tar.gz
minetest-34b7a147dcf9831f3b4d81599c473ba01ff5da00.tar.bz2
minetest-34b7a147dcf9831f3b4d81599c473ba01ff5da00.zip
Change i++ to ++i
Diffstat (limited to 'src/tool.cpp')
-rw-r--r--src/tool.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tool.cpp b/src/tool.cpp
index e013d5ea8..54b9f15f4 100644
--- a/src/tool.cpp
+++ b/src/tool.cpp
@@ -35,7 +35,7 @@ void ToolCapabilities::serialize(std::ostream &os, u16 protocol_version) const
writeS16(os, max_drop_level);
writeU32(os, groupcaps.size());
for(std::map<std::string, ToolGroupCap>::const_iterator
- i = groupcaps.begin(); i != groupcaps.end(); i++){
+ i = groupcaps.begin(); i != groupcaps.end(); ++i){
const std::string *name = &i->first;
const ToolGroupCap *cap = &i->second;
os<<serializeString(*name);
@@ -43,7 +43,7 @@ void ToolCapabilities::serialize(std::ostream &os, u16 protocol_version) const
writeS16(os, cap->maxlevel);
writeU32(os, cap->times.size());
for(std::map<int, float>::const_iterator
- i = cap->times.begin(); i != cap->times.end(); i++){
+ i = cap->times.begin(); i != cap->times.end(); ++i){
writeS16(os, i->first);
writeF1000(os, i->second);
}
@@ -51,7 +51,7 @@ void ToolCapabilities::serialize(std::ostream &os, u16 protocol_version) const
if(protocol_version > 17){
writeU32(os, damageGroups.size());
for(std::map<std::string, s16>::const_iterator
- i = damageGroups.begin(); i != damageGroups.end(); i++){
+ i = damageGroups.begin(); i != damageGroups.end(); ++i){
os<<serializeString(i->first);
writeS16(os, i->second);
}
@@ -116,7 +116,7 @@ DigParams getDigParams(const ItemGroupList &groups,
int level = itemgroup_get(groups, "level");
//infostream<<"level="<<level<<std::endl;
for(std::map<std::string, ToolGroupCap>::const_iterator
- i = tp->groupcaps.begin(); i != tp->groupcaps.end(); i++){
+ i = tp->groupcaps.begin(); i != tp->groupcaps.end(); ++i){
const std::string &name = i->first;
//infostream<<"group="<<name<<std::endl;
const ToolGroupCap &cap = i->second;
@@ -164,7 +164,7 @@ HitParams getHitParams(const ItemGroupList &armor_groups,
float full_punch_interval = tp->full_punch_interval;
for(std::map<std::string, s16>::const_iterator
- i = tp->damageGroups.begin(); i != tp->damageGroups.end(); i++){
+ i = tp->damageGroups.begin(); i != tp->damageGroups.end(); ++i){
s16 armor = itemgroup_get(armor_groups, i->first);
damage += i->second * rangelim(time_from_last_punch / full_punch_interval, 0.0, 1.0)
* armor / 100.0;