summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/random-weight.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-07-05 12:14:09 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-07-05 12:14:09 +0200
commitc41419c4f47bbf0737d3fedf58128c835d2c4e3b (patch)
tree764ae18c107df39fd90af718922036bd245561ca /crawl-ref/source/random-weight.h
parentb80adef8882143cad34f3c8bcc9a8ccbd4440223 (diff)
downloadcrawl-ref-c41419c4f47bbf0737d3fedf58128c835d2c4e3b.tar.gz
crawl-ref-c41419c4f47bbf0737d3fedf58128c835d2c4e3b.zip
Drop parentheses around scalar values in "return".
Diffstat (limited to 'crawl-ref/source/random-weight.h')
-rw-r--r--crawl-ref/source/random-weight.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/random-weight.h b/crawl-ref/source/random-weight.h
index 55a6db400f..a73eb50ef2 100644
--- a/crawl-ref/source/random-weight.h
+++ b/crawl-ref/source/random-weight.h
@@ -21,7 +21,7 @@ T* random_choose_weighted(std::vector<std::pair<T, int> >& choices)
if (sum > r)
return (&choices[i].first);
}
- return (NULL);
+ return NULL;
}
/*
@@ -45,7 +45,7 @@ T random_choose_weighted(FixedVector<T, SIZE>& choices)
sum += choices[i];
if (sum > r)
- return (i);
+ return i;
}
return -1;
}