I am making a C++ SDL based game engine, and I need help sorting some things out. First…
Jump to turn (18)
- 1I am making a C++ SDL based game engine, and I need help sorting some things out
- 2in this doxygen comment, should the part that starts with "A hat switch..." and
- 3Currently I have all my touching events as TouchFinger[...]Event, but I am unsur
- 4In constructors for example of this event, should std::string be defined with a
- 5I have made several event base classes, like for example GamepadBaseEvent, or Ke
- 6My class is similar to that, but has the destructor as public, is this correct?
- 7Why did you add the part to Prevent copying and assignment to the base class Eve
- 8But I don't manage any rosource or something that you could call ownership, so I
- 9OK, In another topic, I have several forward declarations of methods that aren't
- 10Ok I wanted to be generic to hear your answer but now I will be more specific to
- 11OK I found out my uint8t priority variable inside my base class Event is not ini
- 12this are my subjective priority categories: Priority Categories: - Immediate (25
- 13OK where should I add this new information to my doxygen comment? inside the not
- 14Why cppcheck is giving me this message, is this an error by cppcheck or somethin
- 15So how would a constructor marked as explicit be called differently from an impl
- 16So I don't like the implicit conversion, it is ok if I mark every single constru
- 17Ok I changed point to be explicit and it is giving me an error at initilization:
- 18I seen in some codes that in doxygen param they add an [in] or [out] before the
- User
I am making a C++ SDL based game engine, and I need help sorting some things out. First I am checking my code and I want to know if this is the correct way to order a priority queue where the higher numbers means more priority or if I messed up the "lesster than" bracket:
struct EventComparator { bool operator()(const std::shared_ptr& a, const std::shared_ptr& b) const { return a->GetPriority() < b->GetPriority(); } }; std::priority_queue<std::shared_ptr, std::vector<std::shared_ptr>, EventComparator> eventQueue;
- Assistant