[osmium-tool] 09/44: Explicitly make constant 0 a size_t to avoid warning on MSVC.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue Jul 21 20:15:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to tag v1.1.0
in repository osmium-tool.

commit 441834e2df1e799cb7ed1690fa0733ca8884ee9d
Author: Jochen Topf <jochen at topf.org>
Date:   Tue Apr 21 12:57:24 2015 +0200

    Explicitly make constant 0 a size_t to avoid warning on MSVC.
---
 src/command_help.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/command_help.cpp b/src/command_help.cpp
index 28d8301..899118f 100644
--- a/src/command_help.cpp
+++ b/src/command_help.cpp
@@ -49,7 +49,7 @@ bool CommandHelp::run() {
         auto commands = CommandFactory::help();
 
         // find the maximum length of all command names
-        size_t max_width = std::accumulate(commands.begin(), commands.end(), 0, [](size_t max_so_far, std::pair<std::string, std::string> info) {
+        size_t max_width = std::accumulate(commands.begin(), commands.end(), size_t(0), [](size_t max_so_far, std::pair<std::string, std::string> info) {
             return std::max(max_so_far, info.first.length());
         });
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium-tool.git



More information about the Pkg-grass-devel mailing list