Skip to content

Conversation

@cmsaunders
Copy link

No description provided.

@mwittgen mwittgen self-requested a review November 25, 2025 18:51
*
* You should have received a copy of the LSST License Statement and
* the GNU General Public License along with this program. If not,
* see <https://www.lsstcorp.org/LegalNotices/>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The license banner is outdated

* You should have received a copy of the LSST License Statement and
* the GNU General Public License along with this program. If not,
* see <https://www.lsstcorp.org/LegalNotices/>.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

outdated banner

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed these two licenses, plus the python/astshim/splineMap.cc one, but it looks like almost all the others in the repo are wrong too. I guess that can be another ticket.

: Mapping(reinterpret_cast<AstMapping *>(
_makeRawSplineMap(kx, ky, nx, ny, tx, ty, cu, cv, options))) {}

virtual ~SplineMap() {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
virtual ~SplineMap() {}
~SplineMap() override = default;



protected:
virtual std::shared_ptr<Object> copyPolymorphic() const override {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

virtual is redundant as the function is declared override

Suggested change
virtual std::shared_ptr<Object> copyPolymorphic() const override {
std::shared_ptr<Object> copyPolymorphic() const override {

}

/// Construct a SplineMap from an raw AST pointer
SplineMap(AstSplineMap *map);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SplineMap(AstSplineMap *map);
explicit SplineMap(AstSplineMap *map);

#ifndef ASTSHIM_SPLINEMAP_H
#define ASTSHIM_SPLINEMAP_H

#include <algorithm>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing from algorithm is used in this header

@@ -0,0 +1,51 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the newer banner that should be used in the other new files as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/SplineMap.cc Outdated
std::vector<double> const &ty, std::vector<double> const &cu, std::vector<double> const &cv,
std::string const &options) const {

const int nTx = tx.size();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These do a narrowing cast.
size() returns size_t (unsigned 64 bit)
int is 32 bit (signed)
Likely OK as the vectors are not big.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be safe, I changed these to size_t, added a check that kx, ky, nx, and ny are not negative, and convert the kx + nx, nx * ny, etc. terms to size_t to prevent a compiler warning.

Copy link
Contributor

@mwittgen mwittgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments.
Check license banners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants