mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 01:51:49 +08:00
FIXED removed unnecessary operator from JKQTPColumnIterator and JKQTPColumnConstIterator, which lead to exceptions on some compilers
This commit is contained in:
parent
1858385952
commit
946e472ce7
@ -56,6 +56,7 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
|
||||
<li>FIXED issue <a href="https://github.com/jkriege2/JKQtPlotter/pull/99">#99: Height of one-column key/legend was too large</a> (thanks to <a href="https://github.com/allenbarnett5">user:allenbarnett5/a> for reporting)</li>
|
||||
<li>FIXED issue mentioned in <a href="https://github.com/jkriege2/JKQtPlotter/pull/110">#110: Lock the panning action to certain values: View zooms in, when panning close to AbosluteXY</a> (thanks to <a href="https://github.com/sim186">user:sim186</a> for reporting)</li>
|
||||
<li>FIXED: jkqtpstatSum() and jkqtpstatSumSqr() did not work, as a non-existing function is called internally</li>
|
||||
<li>FIXED removed unnecessary operators (<,>,<=,>=) from JKQTPColumnIterator and JKQTPColumnConstIterator, which lead to exceptions on some compilers (MSVC)</li>
|
||||
<li>FIXED/IMPROVED issue <a href="https://github.com/jkriege2/JKQtPlotter/issues/100">#100: Add option to disable resize delay feature by setting the delay to zero</a> (thanks to <a href="https://github.com/fpalazzolo">user:fpalazzolo</a> for reporting)</li>
|
||||
<li>FIXED/NEW: placement of plot-title (was not centerd in its box, but glued to the bottom) by adding a plotstyle parameter JKQTBasePlotterStyle::plotLabelOffset</li>
|
||||
<li>FIXED/REWORKED issue <a href="https://github.com/jkriege2/JKQtPlotter/issues/111">#111: Can't write to PDF files with JKQTPlotter::saveImage() when passing a filename ending in ".pdf"</a> (thanks to <a href="https://github.com/fpalazzolo">user:fpalazzolo</a> for reporting):<br/>While fixing this issue, the functions JKQTBasePlotter::saveImage() etc. gained a bool return value to indicate whether sacing was successful.</li>
|
||||
|
@ -76,7 +76,6 @@ int main(int argc, char* argv[])
|
||||
plot.show();
|
||||
plot.resize(600,400);
|
||||
|
||||
|
||||
app.addExportStepFunctor([&]() { std::sort(datastore->begin(YCol), datastore->end(YCol)); });
|
||||
app.addExportStepFunctor([&]() {
|
||||
std::replace_if(datastore->begin(YCol2), datastore->end(YCol2), [](double v) { return v<-0.5; }, 1.0); linegraph->setYColumn(YCol2); plot.zoomToFit(); });
|
||||
|
@ -1780,60 +1780,7 @@ class JKQTPColumnIterator {
|
||||
JKQTPASSERT((col_!=nullptr) && (pos_+off>=0) && (pos_+off<static_cast<int>(col_->getRows())));
|
||||
return col_->at(pos_+off);
|
||||
}
|
||||
/** \brief comparison operator (less than)
|
||||
*
|
||||
* rules:
|
||||
* - ivalid iterators are never smaller than valid operators
|
||||
* - two valid operator must reference the same column
|
||||
* - a valid operator is smaller than another, if it points to a pos_ before another
|
||||
* .
|
||||
*
|
||||
* \see operator<=(), operator>(), operator>=()
|
||||
* */
|
||||
inline bool operator<(const self_type& rhs) const {
|
||||
JKQTPASSERT(isValid() || rhs.isValid());
|
||||
if (!isValid() && rhs.isValid()) {
|
||||
return false;
|
||||
} else if (isValid() && !rhs.isValid()) {
|
||||
return true;
|
||||
} else {
|
||||
JKQTPASSERT(col_ == rhs.col_);
|
||||
return pos_<rhs.pos_;
|
||||
}
|
||||
}
|
||||
/** \brief comparison operator (less than, or equal)
|
||||
* \see operator==(), operator<(), operator>(), operator>=()
|
||||
* */
|
||||
inline bool operator<=(const self_type& rhs) const {
|
||||
return operator==(rhs) || operator<(rhs);
|
||||
}
|
||||
/** \brief comparison operator (larger than)
|
||||
*
|
||||
* rules:
|
||||
* - ivalid iterators are always larger than valid operators
|
||||
* - two valid operator must reference the same column
|
||||
* - a valid operator is smaller than another, if it points to a pos_ before another
|
||||
* .
|
||||
*
|
||||
* \see operator<=(), operator<(), operator>=()
|
||||
* */
|
||||
inline bool operator>(const self_type& rhs) const {
|
||||
JKQTPASSERT(isValid() || rhs.isValid());
|
||||
if (!isValid() && rhs.isValid()) {
|
||||
return true;
|
||||
} else if (isValid() && !rhs.isValid()) {
|
||||
return false;
|
||||
} else {
|
||||
JKQTPASSERT(col_ == rhs.col_);
|
||||
return pos_>rhs.pos_;
|
||||
}
|
||||
}
|
||||
/** \brief comparison operator (larger than, or equal)
|
||||
* \see operator==(), operator<(), operator>(), operator<=()
|
||||
* */
|
||||
inline bool operator>=(const self_type& rhs) const {
|
||||
return operator==(rhs) || operator>(rhs);
|
||||
}
|
||||
|
||||
/** \brief comparison operator (equals)
|
||||
*
|
||||
* two iterators are equal, if:
|
||||
@ -2111,60 +2058,7 @@ class JKQTPColumnConstIterator {
|
||||
JKQTPASSERT(col_!=nullptr && pos_>=0 && pos_<static_cast<int>(col_->getRows()));
|
||||
return col_->at(pos_);
|
||||
}
|
||||
/** \brief comparison operator (less than)
|
||||
*
|
||||
* rules:
|
||||
* - ivalid iterators are never smaller than valid operators
|
||||
* - two valid operator must reference the same column
|
||||
* - a valid operator is smaller than another, if it points to a pos_ before another
|
||||
* .
|
||||
*
|
||||
* \see operator<=(), operator>(), operator>=()
|
||||
* */
|
||||
inline bool operator<(const self_type& rhs) const {
|
||||
JKQTPASSERT(isValid() || rhs.isValid());
|
||||
if (!isValid() && rhs.isValid()) {
|
||||
return false;
|
||||
} else if (isValid() && !rhs.isValid()) {
|
||||
return true;
|
||||
} else {
|
||||
JKQTPASSERT(col_ == rhs.col_);
|
||||
return pos_<rhs.pos_;
|
||||
}
|
||||
}
|
||||
/** \brief comparison operator (less than, or equal)
|
||||
* \see operator==(), operator<(), operator>(), operator>=()
|
||||
* */
|
||||
inline bool operator<=(const self_type& rhs) const {
|
||||
return operator==(rhs) || operator<(rhs);
|
||||
}
|
||||
/** \brief comparison operator (larger than)
|
||||
*
|
||||
* rules:
|
||||
* - ivalid iterators are always larger than valid operators
|
||||
* - two valid operator must reference the same column
|
||||
* - a valid operator is smaller than another, if it points to a pos_ before another
|
||||
* .
|
||||
*
|
||||
* \see operator<=(), operator<(), operator>=()
|
||||
* */
|
||||
inline bool operator>(const self_type& rhs) const {
|
||||
JKQTPASSERT(isValid() || rhs.isValid());
|
||||
if (!isValid() && rhs.isValid()) {
|
||||
return true;
|
||||
} else if (isValid() && !rhs.isValid()) {
|
||||
return false;
|
||||
} else {
|
||||
JKQTPASSERT(col_ == rhs.col_);
|
||||
return pos_>rhs.pos_;
|
||||
}
|
||||
}
|
||||
/** \brief comparison operator (larger than, or equal)
|
||||
* \see operator==(), operator<(), operator>(), operator<=()
|
||||
* */
|
||||
inline bool operator>=(const self_type& rhs) const {
|
||||
return operator==(rhs) || operator>(rhs);
|
||||
}
|
||||
|
||||
/** \brief comparison operator (equals)
|
||||
*
|
||||
* two iterators are equal, if:
|
||||
|
Loading…
Reference in New Issue
Block a user