mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
BasicParser now uses string_view
This commit is contained in:
parent
65e85f362c
commit
5da2a30326
9 changed files with 45 additions and 43 deletions
|
|
@ -35,8 +35,8 @@ const std::string& langs::Lang::getId() const {
|
|||
return locale;
|
||||
}
|
||||
|
||||
/* Language key-value txt files parser */
|
||||
class Reader : public BasicParser {
|
||||
// @brief Language key-value txt files parser
|
||||
class Reader : BasicParser {
|
||||
void skipWhitespace() override {
|
||||
BasicParser::skipWhitespace();
|
||||
if (hasNext() && source[pos] == '#') {
|
||||
|
|
@ -47,7 +47,7 @@ class Reader : public BasicParser {
|
|||
}
|
||||
}
|
||||
public:
|
||||
Reader(const std::string& file, const std::string& source) : BasicParser(file, source) {
|
||||
Reader(std::string_view file, std::string_view source) : BasicParser(file, source) {
|
||||
}
|
||||
|
||||
void read(langs::Lang& lang, std::string prefix) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue