Skip to content

Commit

Permalink
Merge pull request #386 from CCPPETMR/osx_suppress_gadgetron_warning
Browse files Browse the repository at this point in the history
although it was correct, osx gave lots of warnings for -Wlogical-op-parentheses
  • Loading branch information
rijobro committed May 17, 2019
2 parents 6bc90c3 + 6ab0a5d commit 5699213
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ namespace sirf {
}
Iterator& operator++()
{
if (i_ >= n_ || i_ == n_ - 1 && iter_ == end_)
if (i_ >= n_ || (i_ == n_ - 1 && iter_ == end_))
throw std::out_of_range("cannot advance out-of-range iterator");
++iter_;
if (iter_ == end_ && i_ < n_ - 1) {
Expand All @@ -523,7 +523,7 @@ namespace sirf {
Iterator& operator++(int)
{
sptr_iter_.reset(new Iterator(*this));
if (i_ >= n_ || i_ == n_ - 1 && iter_ == end_)
if (i_ >= n_ || (i_ == n_ - 1 && iter_ == end_))
throw std::out_of_range("cannot advance out-of-range iterator");
++iter_;
if (iter_ == end_ && i_ < n_ - 1) {
Expand All @@ -536,7 +536,7 @@ namespace sirf {
}
NumRef& operator*()
{
if (i_ >= n_ || i_ == n_ - 1 && iter_ == end_)
if (i_ >= n_ || (i_ == n_ - 1 && iter_ == end_))
throw std::out_of_range
("cannot dereference out-of-range iterator");
return *iter_;
Expand Down Expand Up @@ -569,6 +569,7 @@ namespace sirf {
iter_ = iter.iter_;
end_ = iter.end_;
sptr_iter_ = iter.sptr_iter_;
return *this;
}
bool operator==(const BaseIter_const& ai) const
{
Expand All @@ -584,7 +585,7 @@ namespace sirf {
}
Iterator_const& operator++()
{
if (i_ >= n_ || i_ == n_ - 1 && iter_ == end_)
if (i_ >= n_ || (i_ == n_ - 1 && iter_ == end_))
throw std::out_of_range("cannot advance out-of-range iterator");
++iter_;
if (iter_ == end_ && i_ < n_ - 1) {
Expand All @@ -599,7 +600,7 @@ namespace sirf {
//Iterator_const& operator++(int)
//{
// sptr_iter_.reset(new Iterator_const(*this));
// if (i_ >= n_ || i_ == n_ - 1 && iter_ == end_)
// if (i_ >= n_ || (i_ == n_ - 1 && iter_ == end_))
// throw std::out_of_range("cannot advance out-of-range iterator");
// ++iter_;
// if (iter_ == end_ && i_ < n_ - 1) {
Expand All @@ -612,7 +613,7 @@ namespace sirf {
//}
const NumRef& operator*() const
{
if (i_ >= n_ || i_ == n_ - 1 && iter_ == end_)
if (i_ >= n_ || (i_ == n_ - 1 && iter_ == end_))
throw std::out_of_range
("cannot dereference out-of-range iterator");
ref_.copy(*iter_);
Expand Down

0 comments on commit 5699213

Please sign in to comment.