Skip to content

Commit 4cb1065

Browse files
Core Solver - Move adjustment data and results into mmsolver namespace
... for consistency.
1 parent bd2478f commit 4cb1065

File tree

6 files changed

+32
-4
lines changed

6 files changed

+32
-4
lines changed

src/mmSolver/adjust/adjust_data.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
#include "mmSolver/mayahelper/maya_marker.h"
5656
#include "mmSolver/utilities/debug_utils.h"
5757

58+
namespace mmsolver {
59+
5860
// Group all the benchmark timers together.
5961
struct SolverTimer {
6062
mmsolver::debug::Timestamp startTimestamp;
@@ -279,4 +281,6 @@ struct SolverData {
279281
, logLevel(LogLevel::kInfo){};
280282
};
281283

284+
} // namespace mmsolver
285+
282286
#endif // MM_SOLVER_CORE_BUNDLE_ADJUST_DATA_H

src/mmSolver/adjust/adjust_results.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
#include "mmSolver/utilities/debug_utils.h"
5555
#include "mmSolver/utilities/string_utils.h"
5656

57+
namespace mmsolver {
58+
5759
using Ticks = mmsolver::debug::Ticks;
5860

5961
struct SolverResult {
@@ -582,22 +584,26 @@ struct MarkerAttrNamePair {
582584
}
583585
};
584586

587+
} // namespace mmsolver
588+
585589
namespace std {
586590

587591
template <>
588-
struct hash<MarkerAttrNamePair> {
589-
size_t operator()(MarkerAttrNamePair const &s) const noexcept {
592+
struct hash<mmsolver::MarkerAttrNamePair> {
593+
size_t operator()(mmsolver::MarkerAttrNamePair const &s) const noexcept {
590594
size_t result = 0;
591595
size_t h1 = hash<string>{}(s.marker_name);
592596
size_t h2 = hash<string>{}(s.attr_name);
593-
hash_combine(result, h1);
594-
hash_combine(result, h2);
597+
mmsolver::hash_combine(result, h1);
598+
mmsolver::hash_combine(result, h2);
595599
return result;
596600
}
597601
};
598602

599603
} // namespace std
600604

605+
namespace mmsolver {
606+
601607
struct AffectsResult {
602608
typedef AffectsResult Self;
603609

@@ -1011,4 +1017,6 @@ struct CommandResult {
10111017
}
10121018
};
10131019

1020+
} // namespace mmsolver
1021+
10141022
#endif // MM_SOLVER_CORE_BUNDLE_ADJUST_RESULTS_H

src/mmSolver/adjust/adjust_results_setMarkerData.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
#include "adjust_results_helpers.h"
3535
#include "mmSolver/utilities/debug_utils.h"
3636

37+
namespace mmsolver {
38+
3739
MStatus setErrorMetricsResultDataOnMarkers(ErrorMetricsResult &results,
3840
MarkerPtrList &markerList,
3941
MDGModifier &dgmod,
@@ -66,3 +68,5 @@ MStatus setErrorMetricsResultDataOnMarkers(ErrorMetricsResult &results,
6668

6769
return status;
6870
}
71+
72+
} // namespace mmsolver

src/mmSolver/adjust/adjust_results_setMarkerData.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@
3434
#include "adjust_results.h"
3535
#include "mmSolver/mayahelper/maya_marker.h"
3636

37+
namespace mmsolver {
38+
3739
MStatus setErrorMetricsResultDataOnMarkers(ErrorMetricsResult &results,
3840
MarkerPtrList &markerList,
3941
MDGModifier &dgmod,
4042
MAnimCurveChange &curveChange);
4143

44+
} // namespace mmsolver
45+
4246
#endif // MM_SOLVER_CORE_BUNDLE_ADJUST_RESULTS_SET_MARKER_DATA_H

src/mmSolver/adjust/adjust_results_setSolveData.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
#include "adjust_results_helpers.h"
4040
#include "mmSolver/utilities/debug_utils.h"
4141

42+
namespace mmsolver {
43+
4244
MStatus createResultAttr_boolean(const char *attr_name, MObject &node,
4345
MDGModifier &dgmod) {
4446
MFnNumericAttribute numeric_attr;
@@ -714,3 +716,5 @@ MStatus setCommandResultDataOnNode(CommandResult &results,
714716

715717
return status;
716718
}
719+
720+
} // namespace mmsolver

src/mmSolver/adjust/adjust_results_setSolveData.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@
3232
#include "adjust_data.h"
3333
#include "adjust_results.h"
3434

35+
namespace mmsolver {
36+
3537
MStatus setCommandResultDataOnNode(CommandResult &results,
3638
const PrintStatOptions &printStats,
3739
MObject &node, MDGModifier &dgmod,
3840
MAnimCurveChange &curveChange);
3941

42+
} // namespace mmsolver
43+
4044
#endif // MM_SOLVER_CORE_BUNDLE_ADJUST_RESULTS_SET_SOLVE_DATA_H

0 commit comments

Comments
 (0)