diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-04-26 05:58:49 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-04-26 05:58:49 +0000 |
| commit | 90d5b5c0a268e145cd121a0bcf2bdc0b624f0ca3 (patch) | |
| tree | 913532d3875403d87d38037dcca0e15c3fed539c /src/option_processing.cc | |
| parent | 0f92203ffebb18f754cffecc06dcb2bea2189594 (diff) | |
2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added StringFormat class, which internally calls vasprintf.
operator<< is defined for this class, so it can be used with iostream
classes nicely. SimpleLogger and following functions are rewritten
using StringFormat class.
Besides, now Logger class's methods are non-const, many classes
that has a const Logger* as a member variable are modified to remove
const qualifier from the variable declaration.
* src/HelpItemFactory.cc
* src/Request.cc
* src/SimpleLogger.cc
* src/StringFormat.cc
* src/StringFormat.h
* src/Util.cc
* src/option_processing.cc
* src/version_usage.cc
* test/StringFormatTest.cc
* src/*.h: The classes that has const Logger* as a member variable.
Diffstat (limited to 'src/option_processing.cc')
| -rw-r--r-- | src/option_processing.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/option_processing.cc b/src/option_processing.cc index 4a5b78a8..0f344bd6 100644 --- a/src/option_processing.cc +++ b/src/option_processing.cc @@ -44,6 +44,7 @@ #include "a2io.h" #include "help_tags.h" #include "File.h" +#include "StringFormat.h" #include <cstdlib> #include <fstream> #include <sstream> @@ -523,8 +524,8 @@ Option* option_processing(int argc, char* const argv[]) exit(EXIT_FAILURE); } } else if(ucfname.size()) { - printf("Configuration file %s is not found.", cfname.c_str()); - std::cout << "\n"; + std::cout << StringFormat("Configuration file %s is not found.", cfname.c_str()) + << "\n"; } } try { |
