فهرست منبع

Improved Integer class

- made "getValue" method const
Patrick 4 سال پیش
والد
کامیت
0d44494912
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      source/boxing/Integer.cpp
  2. 1 1
      source/boxing/Integer.hpp

+ 1 - 1
source/boxing/Integer.cpp

@@ -257,6 +257,6 @@ std::string ls_std::Integer::toString()
   return std::to_string(this->value);
 }
 
-int ls_std::Integer::getValue() {
+int ls_std::Integer::getValue() const {
   return this->value;
 }

+ 1 - 1
source/boxing/Integer.hpp

@@ -107,7 +107,7 @@ namespace ls_std {
 
       // additional functionality
 
-      int getValue();
+      int getValue() const;
 
     private: