Skip to content

Commit 1907ff9

Browse files
committed
fix: restore CI debug helpers
1 parent b3f95f1 commit 1907ff9

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

source/module/core/cmt_debug_log.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#pragma once
2+
3+
#include <string>
4+
5+
namespace cmt_dbg
6+
{
7+
inline void Log(const char*, const char*, const char*, const std::string&)
8+
{
9+
// Intentionally a no-op in normal builds. The call still keeps
10+
// debug-only values "used" so strict CI builds don't fail on warnings.
11+
}
12+
}

source/module/tools/object/mmd_bone_manager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Description: DESC
2323
#include "module/tools/tag/mmd_bone.h"
2424
#include "utils/string_util.hpp"
2525
#include "libMMD/Model/MMD/PMXModel.h"
26+
#include "module/core/cmt_debug_log.h"
2627
#include <cstdlib>
2728
#include <cstring>
2829
#include <sstream>

source/module/tools/object/mmd_model_manager.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ Description: MMD model object
2222
#include "mmd_mesh_manager.h"
2323
#include "mmd_rigid_manager.h"
2424
#include "customgui_priority.h"
25+
#include "description/OMMDModelManager.h"
2526
#include "description/OMMDRigid.h"
2627
#include "description/TMMDBone.h"
2728
#include "maxon/queue.h"
2829
#include "utils/filename_util.hpp"
2930
#include "utils/string_util.hpp"
3031
#include "libMMD/Model/MMD/MMDPhysics.h"
3132
#include "libMMD/Model/MMD/SjisToUnicode.h"
33+
#include "module/core/cmt_debug_log.h"
3234
#include <btBulletDynamicsCommon.h>
3335

3436
#include <algorithm>
@@ -88,14 +90,14 @@ namespace
8890

8991
GeData data;
9092
const Int32 param_id = use_local_name ? PMX_BONE_NAME_LOCAL : PMX_BONE_NAME_UNIVERSAL;
91-
if (tag->GetParameter(CreateDescID(DescLevel(param_id)), data, DESCFLAGS_GET::NONE))
93+
if (GetAtomParameter(tag, CreateDescID(DescLevel(param_id)), data, DESCFLAGS_GET::NONE))
9294
{
9395
const String name = data.GetString();
9496
if (!name.IsEmpty())
9597
return name;
9698
}
9799

98-
if (const BaseObject* object = tag->GetObject())
100+
if (BaseObject* object = const_cast<BaseTag*>(tag)->GetObject())
99101
return object->GetName();
100102

101103
return ""_s;
@@ -326,7 +328,7 @@ namespace
326328
if (!rigid_manager_object || bone_index < 0)
327329
return false;
328330

329-
for (const BaseObject* child = rigid_manager_object->GetDown(); child; child = child->GetNext())
331+
for (BaseObject* child = const_cast<BaseObject*>(rigid_manager_object)->GetDown(); child; child = child->GetNext())
330332
{
331333
if (!child->IsInstanceOf(g_mmd_rigid_object_id))
332334
continue;
@@ -1935,7 +1937,7 @@ Bool MMDModelManagerObject::BuildStandaloneBoneAdapters()
19351937
Int32 priority = 0;
19361938
if (GeData priority_data; bone_tag->GetParameter(ConstDescID(DescLevel(EXPRESSION_PRIORITY)), priority_data, DESCFLAGS_GET::NONE))
19371939
{
1938-
if (const auto* const pd = priority_data.GetCustomDataType<PriorityData>())
1940+
if (const auto* const pd = GetCustomDataTypeWritable<PriorityData>(priority_data, CUSTOMGUI_PRIORITY_DATA))
19391941
priority = pd->GetPriorityValue(PRIORITYVALUE_PRIORITY).GetInt32();
19401942
}
19411943
max_bone_priority = std::max(max_bone_priority, priority);

source/module/tools/tag/mmd_bone.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Description: DESC
2727
#include "libMMD/Model/MMD/MMDIkSolver.h"
2828
#include "libMMD/Model/MMD/VMDInterpolation.h"
2929
#include "utils/math_util.hpp"
30+
#include "module/core/cmt_debug_log.h"
3031
#include <sstream>
3132

3233
namespace

0 commit comments

Comments
 (0)