mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-30 09:08:35 +00:00
adding an utils struct
This commit is contained in:
@@ -441,4 +441,19 @@ namespace BBM {
|
||||
}
|
||||
return strings;
|
||||
}
|
||||
|
||||
std::string ParserYAML::getHeader(const std::string &line)
|
||||
{
|
||||
std::stringstream ss(line);
|
||||
std::string headerName;
|
||||
std::string garbage;
|
||||
|
||||
ss >> headerName >> garbage;
|
||||
|
||||
|
||||
if (!garbage.empty()) {
|
||||
throw ParserError("error on getHeader line: ");
|
||||
}
|
||||
return headerName;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user