From 9c269440560ac3ea4c9e394c5995f8c9034a9da0 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 28 Feb 2014 12:07:28 -0500 Subject: [PATCH] util.cxx: make tokenize() args optional in declaration --- util.cxx | 4 ++-- util.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/util.cxx b/util.cxx index 5283c8084..43ca9dab9 100644 --- a/util.cxx +++ b/util.cxx @@ -307,7 +307,7 @@ getmemusage () void tokenize(const string& str, vector& tokens, - const string& delimiters = " ") + const string& delimiters) { // Skip delimiters at beginning. string::size_type lastPos = str.find_first_not_of(delimiters, 0); @@ -329,7 +329,7 @@ tokenize(const string& str, vector& tokens, // last delimiter and allow internal empty tokens void tokenize_full(const string& str, vector& tokens, - const string& delimiters = " ") + const string& delimiters) { // Check for an empty string or a string of length 1. Neither can have the requested // components. diff --git a/util.h b/util.h index 534b475be..89d844bbe 100644 --- a/util.h +++ b/util.h @@ -61,9 +61,9 @@ extern "C" gid_t get_gid (const char *group_name); bool in_group_id (gid_t target_gid); std::string getmemusage (); void tokenize(const std::string& str, std::vector& tokens, - const std::string& delimiters); + const std::string& delimiters = " "); void tokenize_full(const std::string& str, std::vector& tokens, - const std::string& delimiters); + const std::string& delimiters = " "); void tokenize_cxx(const std::string& str, std::vector& tokens); std::vector > split_lines(const char *buf, size_t n); std::string find_executable(const std::string& name); -- 2.43.5