Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

although it was correct, osx gave lots of warnings for -Wlogical-op-parentheses #386

Merged
merged 2 commits into from
May 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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