Skip to content

Commit

Permalink
Follow up fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jankrassnigg committed Jul 18, 2023
1 parent fa0c8dd commit 8dc02d5
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void ezAssetCurator::StartInitialize(const ezApplicationFileSystemConfig& cfg)

m_pAssetTableWriter = EZ_DEFAULT_NEW(ezAssetTableWriter, m_FileSystemConfig);

ezSharedPtr<ezDelegateTask<void>> pInitTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "AssetCuratorUpdateCache", [this]() {
ezSharedPtr<ezDelegateTask<void>> pInitTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "AssetCuratorUpdateCache", ezTaskNesting::Never, [this]() {
EZ_LOCK(m_CuratorMutex);

m_CuratorMutex.Unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void ezAssetDocument::InternalAfterSaveDocument()
{
ezUuid docGuid = GetGuid();

ezSharedPtr<ezDelegateTask<void>> pTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "TransformAfterSaveDocument", [docGuid]() {
ezSharedPtr<ezDelegateTask<void>> pTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "TransformAfterSaveDocument", ezTaskNesting::Never, [docGuid]() {
ezDocument* pDoc = ezDocumentManager::GetDocumentByGuid(docGuid);
if (pDoc == nullptr)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ezGameApplication::ezGameApplication(const char* szAppName, const char* szProjec
: ezGameApplicationBase(szAppName)
, m_sAppProjectPath(szProjectPath)
{
m_pUpdateTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "", ezMakeDelegate(&ezGameApplication::UpdateWorldsAndExtractViews, this));
m_pUpdateTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "UpdateWorldsAndExtractViews", ezTaskNesting::Never, ezMakeDelegate(&ezGameApplication::UpdateWorldsAndExtractViews, this));
m_pUpdateTask->ConfigureTask("GameApplication.Update", ezTaskNesting::Maybe);

s_pGameApplicationInstance = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class EZ_RENDERERCORE_DLL ezCheckBlackboardBoolAnimNode : public ezAnimGraphNode
ezHashedString m_sBlackboardEntry; // [ property ]
ezAnimGraphTriggerOutputPin m_OutOnTrue; // [ property ]
ezAnimGraphTriggerOutputPin m_OutOnFalse; // [ property ]
ezAnimGraphBoolOutputPin m_OutBool; // [ property ]
ezAnimGraphBoolOutputPin m_OutBool; // [ property ]

struct InstanceData
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ EZ_ALWAYS_INLINE ezGALResourceFormat::Enum ezMeshBoneWeigthPrecision::ToResource
return ezGALResourceFormat::RGBAUShortNormalized;
case _32Bit:
return ezGALResourceFormat::RGBAFloat;
break;
EZ_DEFAULT_CASE_NOT_IMPLEMENTED;
}

return ezGALResourceFormat::RGBAUByteNormalized;
}

//////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion Code/Engine/RendererCore/Pipeline/Implementation/View.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ EZ_END_DYNAMIC_REFLECTED_TYPE;

ezView::ezView()
{
m_pExtractTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "", ezMakeDelegate(&ezView::ExtractData, this));
m_pExtractTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "", ezTaskNesting::Never, ezMakeDelegate(&ezView::ExtractData, this));
}

ezView::~ezView() = default;
Expand Down
2 changes: 1 addition & 1 deletion Code/Engine/RendererCore/Pipeline/RenderDataBatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ezRenderDataBatch
};

public:
EZ_DECLARE_POD_TYPE();
// EZ_DECLARE_POD_TYPE(); // ezDelegate has a destructor and therefore ezRenderDataBatch can't be POD

/// \brief This function should return true if the given render data should be filtered and not rendered.
using Filter = ezDelegate<bool(const ezRenderData*)>;
Expand Down
2 changes: 1 addition & 1 deletion Code/EnginePlugins/JoltPlugin/System/JoltWorldModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ezJoltWorldModule::ezJoltWorldModule(ezWorld* pWorld)
: ezPhysicsWorldModuleInterface(pWorld)
//, m_FreeObjectFilterIDs(ezJolt::GetSingleton()->GetAllocator()) // could use a proxy allocator to bin those
{
m_pSimulateTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "", ezMakeDelegate(&ezJoltWorldModule::Simulate, this));
m_pSimulateTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "Jolt::Simulate", ezTaskNesting::Never, ezMakeDelegate(&ezJoltWorldModule::Simulate, this));
m_pSimulateTask->ConfigureTask("Jolt Simulate", ezTaskNesting::Maybe);
}

Expand Down
14 changes: 7 additions & 7 deletions Code/EnginePlugins/JoltPlugin/Utilities/JoltUserData.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ezJoltUserData
EZ_DECLARE_POD_TYPE();

ezJoltUserData() = default;
~ezJoltUserData() { Invalidate(); }
~ezJoltUserData() = default;

EZ_ALWAYS_INLINE void Init(ezJoltDynamicActorComponent* pObject)
{
Expand Down Expand Up @@ -142,13 +142,13 @@ class ezJoltUserData
return nullptr;
}

//EZ_FORCE_INLINE static ezJoltShapeComponent* GetShapeComponent(const void* pUserData)
// EZ_FORCE_INLINE static ezJoltShapeComponent* GetShapeComponent(const void* pUserData)
//{
// const ezJoltUserData* pJoltUserData = static_cast<const ezJoltUserData*>(pUserData);
// if (pJoltUserData != nullptr && pJoltUserData->m_Type == Type::ShapeComponent)
// {
// return static_cast<ezJoltShapeComponent*>(pJoltUserData->m_pObject);
// }
// const ezJoltUserData* pJoltUserData = static_cast<const ezJoltUserData*>(pUserData);
// if (pJoltUserData != nullptr && pJoltUserData->m_Type == Type::ShapeComponent)
// {
// return static_cast<ezJoltShapeComponent*>(pJoltUserData->m_pObject);
// }

// return nullptr;
//}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void ezTypeScriptTranspiler::StartLoadTranspiler()
if (m_LoadTaskGroup.IsValid())
return;

ezSharedPtr<ezTask> pTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "",
ezSharedPtr<ezTask> pTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "Load TypeScript Transpiler", ezTaskNesting::Never,
[this]() //
{
EZ_PROFILE_SCOPE("Load TypeScript Transpiler");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void ezFileSystemWatcher::Initialize()
m_Watchers.PushBack(pWatcher);
}

m_pWatcherTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "Watcher Changes", [this]() {
m_pWatcherTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "Watcher Changes", ezTaskNesting::Never, [this]() {
ezHybridArray<WatcherResult, 16> watcherResults;
for (ezDirectoryWatcher* pWatcher : m_Watchers)
{
Expand All @@ -59,7 +59,7 @@ void ezFileSystemWatcher::Initialize()
} //
});
// This is a separate task as these trigger callbacks which can potentially take a long time and we can't have the watcher changes task be blocked for so long or notifications might get lost.
m_pNotifyTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "Watcher Notify", [this]() { NotifyChanges(); });
m_pNotifyTask = EZ_DEFAULT_NEW(ezDelegateTask<void>, "Watcher Notify", ezTaskNesting::Never, [this]() { NotifyChanges(); });
}

void ezFileSystemWatcher::Deinitialize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <ToolsFoundation/Reflection/PhantomProperty.h>
#include <ToolsFoundation/Reflection/PhantomRtti.h>

ezPhantomRTTI::ezPhantomRTTI(const char* szName, const ezRTTI* pParentType, ezUInt32 uiTypeSize, ezUInt32 uiTypeVersion, ezUInt32 uiVariantType,
ezPhantomRTTI::ezPhantomRTTI(const char* szName, const ezRTTI* pParentType, ezUInt32 uiTypeSize, ezUInt32 uiTypeVersion, ezUInt8 uiVariantType,
ezBitflags<ezTypeFlags> flags, const char* szPluginName)
: ezRTTI(nullptr, pParentType, uiTypeSize, uiTypeVersion, uiVariantType, flags | ezTypeFlags::Phantom, nullptr, ezArrayPtr<ezAbstractProperty*>(),
ezArrayPtr<ezAbstractFunctionProperty*>(), ezArrayPtr<ezPropertyAttribute*>(), ezArrayPtr<ezAbstractMessageHandler*>(),
Expand Down
2 changes: 1 addition & 1 deletion Code/Tools/Libs/ToolsFoundation/Reflection/PhantomRtti.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ezPhantomRTTI : public ezRTTI
~ezPhantomRTTI();

private:
ezPhantomRTTI(const char* szName, const ezRTTI* pParentType, ezUInt32 uiTypeSize, ezUInt32 uiTypeVersion, ezUInt32 uiVariantType,
ezPhantomRTTI(const char* szName, const ezRTTI* pParentType, ezUInt32 uiTypeSize, ezUInt32 uiTypeVersion, ezUInt8 uiVariantType,
ezBitflags<ezTypeFlags> flags, const char* szPluginName);

void SetProperties(ezDynamicArray<ezReflectedPropertyDescriptor>& properties);
Expand Down
2 changes: 1 addition & 1 deletion Code/UnitTests/CoreTest/Utils/IntervalSchedulerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ EZ_CREATE_SIMPLE_TEST(Utils, IntervalScheduler)
for (ezUInt32 i = 0; i < 32; ++i)
{
auto& work = works.ExpandAndGetRef();
work.m_IntervalMs = (i & 1);
work.m_IntervalMs = static_cast<float>((i & 1u));

scheduler.AddOrUpdateWork(&work, ezTime::Milliseconds(i));
}
Expand Down
4 changes: 2 additions & 2 deletions Code/UnitTests/CoreTest/World/WorldTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ namespace
{
ezUInt32 i = it->GetHandle().GetInternalID().m_InstanceIndex;

ezVec3 newPos = ezVec3(i * 10, 0, 0);
ezVec3 newPos = ezVec3(i * 10.0f, 0, 0);
it->SetLocalPosition(newPos);

ezQuat newRot;
newRot.SetFromAxisAndAngle(ezVec3::UnitZAxis(), ezAngle::Degree(i * 30));
newRot.SetFromAxisAndAngle(ezVec3::UnitZAxis(), ezAngle::Degree(i * 30.0f));
it->SetLocalRotation(newRot);

if (i > 5)
Expand Down

0 comments on commit 8dc02d5

Please sign in to comment.