Skip to content

Commit

Permalink
Make GncOptionDateValue::get_period_index return value size_t.
Browse files Browse the repository at this point in the history
Instead of int8_t to match the built-in vector index type.
  • Loading branch information
jralls committed Aug 1, 2021
1 parent ac0e706 commit 16da320
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libgnucash/app-utils/gnc-option-impl.cpp
Expand Up @@ -97,7 +97,7 @@ GncOptionDateValue::get_default_value() const noexcept
/* Use asserts for pre- and post-conditions to deliberately crash if they're not
* met as the program design should prevent that from happening.
*/
int8_t
size_t
GncOptionDateValue::get_period_index() const noexcept
{
assert (m_period != RelativeDatePeriod::ABSOLUTE);
Expand All @@ -107,7 +107,7 @@ GncOptionDateValue::get_period_index() const noexcept
return item - m_period_set.begin();
}

int8_t
size_t
GncOptionDateValue::get_default_period_index() const noexcept
{
assert(m_period != RelativeDatePeriod::ABSOLUTE);
Expand Down
4 changes: 2 additions & 2 deletions libgnucash/app-utils/gnc-option-impl.hpp
Expand Up @@ -731,8 +731,8 @@ class GncOptionDateValue : public OptionClassifier
time64 get_default_value() const noexcept;
RelativeDatePeriod get_period() const noexcept { return m_period; }
RelativeDatePeriod get_default_period() const noexcept { return m_default_period; }
int8_t get_period_index() const noexcept;
int8_t get_default_period_index() const noexcept;
size_t get_period_index() const noexcept;
size_t get_default_period_index() const noexcept;
std::ostream& out_stream(std::ostream& oss) const noexcept;
std::istream& in_stream(std::istream& iss);
bool validate(RelativeDatePeriod value);
Expand Down

0 comments on commit 16da320

Please sign in to comment.