瀏覽代碼

:recycle: adjusted number type to match documentation

Felix Bytow 2 年之前
父節點
當前提交
4e99ca6871
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      projects/forth-kata/include/Token.h

+ 2 - 1
projects/forth-kata/include/Token.h

@@ -1,6 +1,7 @@
 #ifndef FORTH_KATA_TOKEN_H
 #ifndef FORTH_KATA_TOKEN_H
 #define FORTH_KATA_TOKEN_H
 #define FORTH_KATA_TOKEN_H
 
 
+#include <cstdint>
 #include <iosfwd>
 #include <iosfwd>
 #include <stdexcept>
 #include <stdexcept>
 #include <string>
 #include <string>
@@ -15,7 +16,7 @@ namespace token {
  */
  */
 struct Number final
 struct Number final
 {
 {
-    int value; ///< The numeric value of the token.
+    std::int16_t value; ///< The numeric value of the token.
 
 
     bool operator==(Number const &rhs) const noexcept;
     bool operator==(Number const &rhs) const noexcept;