diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-14 15:33:42 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-14 15:33:42 +0000 |
| commit | f2588a882bace2affc013fee68ef3e1702bc0ab4 (patch) | |
| tree | 010a7b475c4e5b677d09e8f2938932d474165491 /src/OptionParser.cc | |
| parent | 35b219ddc82a3f68bcf89d672481485092cdd1ef (diff) | |
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use A2STR::SHARP_C and A2STR::EQUAL_C.
* src/A2STR.cc
* src/A2STR.h
* src/OptionParser.cc (parse)
Diffstat (limited to 'src/OptionParser.cc')
| -rw-r--r-- | src/OptionParser.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/OptionParser.cc b/src/OptionParser.cc index 551e6929..7a27b7c3 100644 --- a/src/OptionParser.cc +++ b/src/OptionParser.cc @@ -36,6 +36,7 @@ #include "Util.h" #include "OptionHandlerImpl.h" #include "Option.h" +#include "A2STR.h" #include <istream> #include <utility> @@ -47,10 +48,10 @@ void OptionParser::parse(Option* option, std::istream& is) int32_t linenum = 0; while(getline(is, line)) { ++linenum; - if(Util::startsWith(line, "#")) { + if(Util::startsWith(line, A2STR::SHARP_C)) { continue; } - std::pair<std::string, std::string> nv = Util::split(line, "="); + std::pair<std::string, std::string> nv = Util::split(line, A2STR::EQUAL_C); OptionHandlerHandle handler = getOptionHandlerByName(nv.first); handler->parse(option, nv.second); } |
