EventProfiler.cpp 548 B

1234567891011121314151617181920212223242526
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. #include "../Precompiled.h"
  4. #include "../Core/EventProfiler.h"
  5. #include "../DebugNew.h"
  6. namespace Urho3D
  7. {
  8. bool EventProfiler::active = false;
  9. EventProfiler::EventProfiler(Context* context) :
  10. Profiler(context)
  11. {
  12. // FIXME: Is there a cleaner way?
  13. delete root_;
  14. current_ = root_ = new EventProfilerBlock(nullptr, "RunFrame");
  15. delete [] root_->name_;
  16. root_->name_ = new char[sizeof("RunFrame")];
  17. memcpy(root_->name_, "RunFrame", sizeof("RunFrame"));
  18. }
  19. }