Skip to content

Commit 7b08db0

Browse files
sfnSFN-eu
authored andcommitted
Repack inefficient struct found whilst debugging
1 parent 25154a1 commit 7b08db0

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/aliceVision/camera/IntrinsicBase.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,17 +471,18 @@ class IntrinsicBase
471471
void setState(EEstimatorParameterState state) { _state = state; }
472472

473473
protected:
474+
std::string _serialNumber;
475+
double _sensorWidth = 36.0;
476+
double _sensorHeight = 24.0;
477+
unsigned int _w = 0;
478+
unsigned int _h = 0;
479+
474480
/// initialization mode
475481
EInitMode _initializationMode = EInitMode::NONE;
482+
476483
/// intrinsic lock
477484
bool _locked = false;
478485
EEstimatorParameterState _state = EEstimatorParameterState::REFINED;
479-
480-
unsigned int _w = 0;
481-
unsigned int _h = 0;
482-
double _sensorWidth = 36.0;
483-
double _sensorHeight = 24.0;
484-
std::string _serialNumber;
485486
};
486487

487488
/**

src/aliceVision/camera/IntrinsicScaleOffset.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ class IntrinsicScaleOffset : public IntrinsicBase
158158
void setInitialFocalLength(double initialFocalLengthMM, double pixelAspectRatio, bool useCompatibility = false);
159159

160160
protected:
161-
Vec2 _scale{1.0, 1.0};
162-
Vec2 _offset{0.0, 0.0};
163-
Vec2 _initialScale{-1.0, -1.0};
164161
bool _ratioLocked{true};
165162
bool _offsetLocked{false};
166163
bool _scaleLocked{false};
164+
Vec2 _scale{1.0, 1.0};
165+
Vec2 _offset{0.0, 0.0};
166+
Vec2 _initialScale{-1.0, -1.0};
167167
};
168168

169169
} // namespace camera

0 commit comments

Comments
 (0)