Skip to content

Commit

Permalink
Merge pull request #3972 from jjimenezshaw/no-copy-axisdirection
Browse files Browse the repository at this point in the history
Remove copy and move constructors from AxisDirection
  • Loading branch information
rouault authored Nov 29, 2023
2 parents 7786334 + ac37203 commit ce39a39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/proj/coordinatesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ class AxisDirection : public util::CodeList {
valueOf(const std::string &nameIn) noexcept;
//! @endcond

AxisDirection(const AxisDirection&) = delete;
AxisDirection& operator=(const AxisDirection&) = delete;
AxisDirection(AxisDirection&&) = delete;
AxisDirection& operator=(AxisDirection&&) = delete;

PROJ_DLL static const AxisDirection NORTH;
PROJ_DLL static const AxisDirection NORTH_NORTH_EAST;
PROJ_DLL static const AxisDirection NORTH_EAST;
Expand Down
2 changes: 1 addition & 1 deletion src/apps/proj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ int main(int argc, char **argv) {
try {
auto crs = dynamic_cast<const NS_PROJ::crs::ProjectedCRS *>(
P->iso_obj.get());
auto dir =
auto& dir =
crs->coordinateSystem()->axisList()[0]->direction();
swapAxisCrs = dir == NS_PROJ::cs::AxisDirection::NORTH ||
dir == NS_PROJ::cs::AxisDirection::SOUTH;
Expand Down

0 comments on commit ce39a39

Please sign in to comment.