Commit c6419bd5df837eb153ae5e42d0b6f3dbd72be9e2
1 parent
36d302a5
Pass isvalid(), isundefined() and isnotanumber() methods non-const as they query now the parameter.
Since we have to query the parameter to determine it's status, the isvalid(), isundefined() and isnotanumber() methods now call query(). This implies that the methods had to be passed non-const, as query() modifies the members of the parameter.
Showing
2 changed files
with
6 additions
and
6 deletions
include/GPar.hpp
| ... | ... | @@ -82,9 +82,9 @@ public: |
| 82 | 82 | bool islearn(void) const; |
| 83 | 83 | bool isquery(void) const; |
| 84 | 84 | bool isfilename(void) const; |
| 85 | - bool isvalid(void) const; | |
| 86 | - bool isundefined(void) const; | |
| 87 | - bool isnotanumber(void) const; | |
| 85 | + bool isvalid(void); | |
| 86 | + bool isundefined(void); | |
| 87 | + bool isnotanumber(void); | |
| 88 | 88 | std::string print(void) const; |
| 89 | 89 | |
| 90 | 90 | protected: | ... | ... |
src/app/GPar.cpp
| ... | ... | @@ -676,7 +676,7 @@ bool GPar::isfilename(void) const |
| 676 | 676 | /***********************************************************************//** |
| 677 | 677 | * @brief Signals if parameter is valid |
| 678 | 678 | ***************************************************************************/ |
| 679 | -bool GPar::isvalid(void) const | |
| 679 | +bool GPar::isvalid(void) | |
| 680 | 680 | { |
| 681 | 681 | // Query parameter |
| 682 | 682 | query(); |
| ... | ... | @@ -689,7 +689,7 @@ bool GPar::isvalid(void) const |
| 689 | 689 | /***********************************************************************//** |
| 690 | 690 | * @brief Signals if parameter is undefined |
| 691 | 691 | ***************************************************************************/ |
| 692 | -bool GPar::isundefined(void) const | |
| 692 | +bool GPar::isundefined(void) | |
| 693 | 693 | { |
| 694 | 694 | // Query parameter |
| 695 | 695 | query(); |
| ... | ... | @@ -702,7 +702,7 @@ bool GPar::isundefined(void) const |
| 702 | 702 | /***********************************************************************//** |
| 703 | 703 | * @brief Signals if parameter is not a number |
| 704 | 704 | ***************************************************************************/ |
| 705 | -bool GPar::isnotanumber(void) const | |
| 705 | +bool GPar::isnotanumber(void) | |
| 706 | 706 | { |
| 707 | 707 | // Query parameter |
| 708 | 708 | query(); | ... | ... |