diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-26 21:03:19 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-26 21:03:19 +0100 |
| commit | 3f9ab56bd6ed874702900cc327894fc2593ab97b (patch) | |
| tree | 98be2221266d7ad88b69860ad857c502a90840d7 /src/PGN.hpp | |
| parent | f144f14d9c13f58afdcc86210824b25d9bf13a12 (diff) | |
Improve location pointer type flexibility
Diffstat (limited to 'src/PGN.hpp')
| -rw-r--r-- | src/PGN.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/PGN.hpp b/src/PGN.hpp index 0e29ae1..15629af 100644 --- a/src/PGN.hpp +++ b/src/PGN.hpp @@ -24,7 +24,7 @@ private: LargeFileStream pgn_content; /// @brief Contains the location of the end of the last parsed game (1 PGN /// file may have multiple games) - ull LastGameEndLoc; + loctype LastGameEndLoc; public: PGN(); @@ -55,16 +55,16 @@ public: private: /// @brief Populate @a tags with by parsing the one starting at location in /// argument - ull ParseNextTag(ull); + loctype ParseNextTag(loctype); /// @brief Parse a HalfMove at a specific location into @a pgn_content - ull ParseHalfMove(ull, HalfMove *); + loctype ParseHalfMove(loctype, HalfMove *); /// @brief Parse a consecutive sequence of comment - ull ParseComment(ull, HalfMove *); + loctype ParseComment(loctype, HalfMove *); /// @brief Get the next non-blank char location ignoring line comments ('%' /// and ';') - ull GotoNextToken(ull); + loctype GotoNextToken(loctype); /// @brief Goto the end of the current line - ull GotoEOL(ull); + loctype GotoEOL(loctype); }; struct UnexpectedEOF : public std::exception { @@ -85,7 +85,7 @@ struct NoGameFound : public std::exception { struct UnexpectedCharacter : public std::exception { std::string msg; - UnexpectedCharacter(char actual, char required, ull loc) { + UnexpectedCharacter(char actual, char required, loctype loc) { std::stringstream ss; ss << "Expected \'" << required << "\' at location " << loc << " but read \'" << actual << "\'"; |
