Skip to content

Commit

Permalink
fix clang++ warning
Browse files Browse the repository at this point in the history
src/sip/CreateWcsWithSip.cc: In constructor 'lsst::meas::astrom::sip::CreateWcsWithSip<MatchT>::CreateWcsWithSip(const std::vector<T>&, const lsst::afw::geom::SkyWcs&, int, const lsst::geom::Box2I&, int)':
src/sip/CreateWcsWithSip.cc:145:46: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     if (_bbox.isEmpty() && !_matches.empty() > 0) {
                                              ^

Looks like a '_matches.size() > 0' was only half-changed to
'!_matches.empty()'.
  • Loading branch information
PaulPrice committed Mar 8, 2019
1 parent 5ce0e92 commit 040aab4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sip/CreateWcsWithSip.cc
Expand Up @@ -142,7 +142,7 @@ CreateWcsWithSip<MatchT>::CreateWcsWithSip(std::vector<MatchT> const& matches,
* If no BBox is provided, guess one from the input points (extrapolated a bit to allow for fact
* that a finite number of points won't reach to the edge of the image)
*/
if (_bbox.isEmpty() && !_matches.empty() > 0) {
if (_bbox.isEmpty() && !_matches.empty()) {
for (typename std::vector<MatchT>::const_iterator ptr = _matches.begin(); ptr != _matches.end();
++ptr) {
afw::table::SourceRecord const& src = *ptr->second;
Expand Down

0 comments on commit 040aab4

Please sign in to comment.