Skip to content

Commit 9f66936

Browse files
committed
Update private/public
1 parent d638133 commit 9f66936

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Sources/CMathWrapper/include/PQMath.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ class Math {
2626
private:
2727
MathRef ref_;
2828

29-
// Private constructor from MathRef (takes ownership)
30-
explicit Math(MathRef ref) : ref_(ref) {
31-
if (!ref_) {
32-
throw std::runtime_error("Failed to create Math object");
33-
}
34-
}
35-
3629
public:
3730
// Constructors
3831
Math(long long value) : ref_(math_create_int(value)) {
@@ -51,6 +44,13 @@ class Math {
5144

5245
Math(const char* value) : Math(std::string(value)) {}
5346

47+
// Internal constructor from MathRef (for internal use and Constants namespace)
48+
explicit Math(MathRef ref) : ref_(ref) {
49+
if (!ref_) {
50+
throw std::runtime_error("Failed to create Math object");
51+
}
52+
}
53+
5454
// Copy constructor
5555
Math(const Math& other) : ref_(math_copy(other.ref_)) {
5656
if (!ref_) throw std::runtime_error("Failed to copy Math object");

0 commit comments

Comments
 (0)