Permalink
Browse files

Merge branch 'master' of github.com:mapnik/mapnik

  • Loading branch information...
2 parents 8b77547 + a7d7dd2 commit 7d066fe8f7d14fb1d7d13a02b7c1e75da294e452 @springmeyer springmeyer committed Sep 26, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 docs/contributing.markdown
View
8 docs/contributing.markdown
@@ -153,6 +153,14 @@ If you see bits of code around that do not follow these please don't hesitate to
// more...
}
+#### Prefer `empty()` over `size() == 0` if container supports it
+
+This avoids implicit conversions to bool and reduces compiler warnings.
+
+ if (container.empty()) // please
+
+ if (container.size() == 0) // no
+
### Other C++ style resources

0 comments on commit 7d066fe

Please sign in to comment.