Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix string heap error #271

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int main(int argc, char** argv)
}

auto lodMesh = pm.GenerateLodMesh(0.1f, 2000, &mesh);
lodMesh.SetName(std::format("{}_reduced", mesh.GetName()));
lodMesh.SetName(std::format("{}_reduced", mesh.GetName()).c_str());
lodMesh.SetID(pSceneDatabase->GetMeshCount());
pSceneDatabase->AddMesh(cd::MoveTemp(lodMesh));
}
Expand Down
14 changes: 7 additions & 7 deletions public/Scene/APIMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public: \
// String Type
////////////////////////////////////////////////////////////////////////////////////////
#define EXPORT_STRING_TYPE_APIS(Class, Type) \
void Set##Type(Class##TypeTraits::Type id); \
const char* Get##Type() const;
void Set##Type(const char* pValue); \
const char* Get##Type() const; \

#define PIMPL_STRING_TYPE_APIS(Class, Type) \
void Class::Set##Type(Class##TypeTraits::Type value) { return m_p##Class##Impl->Set##Type(cd::MoveTemp(value)); } \
void Class::Set##Type(const char* pValue) { return m_p##Class##Impl->Set##Type(pValue); } \
const char* Class::Get##Type() const { return m_p##Class##Impl->Get##Type().c_str(); } \

#define IMPLEMENT_STRING_TYPE_APIS(Class, Type) \
Expand All @@ -75,9 +75,9 @@ public: \
// Simple Type : bool, char, int, uint, float, double, ... in small size
////////////////////////////////////////////////////////////////////////////////////////
#define EXPORT_SIMPLE_TYPE_APIS(Class, Type) \
void Set##Type(Class##TypeTraits::Type id); \
void Set##Type(Class##TypeTraits::Type value); \
Class##TypeTraits::Type& Get##Type(); \
Class##TypeTraits::Type Get##Type() const;
Class##TypeTraits::Type Get##Type() const; \

#define PIMPL_SIMPLE_TYPE_APIS(Class, Type) \
void Class::Set##Type(Class##TypeTraits::Type value) { return m_p##Class##Impl->Set##Type(cd::MoveTemp(value)); } \
Expand All @@ -97,9 +97,9 @@ public: \
// Complex Type : customized class, ... in large size
////////////////////////////////////////////////////////////////////////////////////////
#define EXPORT_COMPLEX_TYPE_APIS(Class, Type) \
void Set##Type(Class##TypeTraits::Type id); \
void Set##Type(Class##TypeTraits::Type value); \
Class##TypeTraits::Type& Get##Type(); \
const Class##TypeTraits::Type& Get##Type() const;
const Class##TypeTraits::Type& Get##Type() const; \

#define PIMPL_COMPLEX_TYPE_APIS(Class, Type) \
void Class::Set##Type(Class##TypeTraits::Type value) { return m_p##Class##Impl->Set##Type(cd::MoveTemp(value)); } \
Expand Down