Skip to content

Commit

Permalink
Allow comments in Custom.txt
Browse files Browse the repository at this point in the history
All lines that begin with // will be treated as comments and ignored
when parsing that file.
  • Loading branch information
leftylink authored and voxnav committed Nov 14, 2012
1 parent 947d6a2 commit 3f70a48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tyrant_optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,10 @@ unsigned read_custom_decks(Cards& cards, std::string filename, std::map<std::str
++num_line;
if(deck_string.size() > 0)
{
if(strncmp(deck_string.c_str(), "//", 2) == 0)
{
continue;
}
boost::tokenizer<boost::char_delimiters_separator<char> > deck_tokens{deck_string, boost::char_delimiters_separator<char>{false, ":,", ""}};
auto token_iter = deck_tokens.begin();
boost::optional<std::string> deck_name;
Expand Down

0 comments on commit 3f70a48

Please sign in to comment.