Add misc and sfml modules with initial implementations, including new classes, assets, and CMake integration.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Created by David Hackbarth on 27.02.26.
|
||||
//
|
||||
|
||||
#ifndef MISC_TEMPLATES_H
|
||||
#define MISC_TEMPLATES_H
|
||||
|
||||
template<class T>
|
||||
void safeDelete(T*& pObj)
|
||||
{
|
||||
if (pObj != nullptr)
|
||||
{
|
||||
delete pObj;
|
||||
pObj = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
template<class T>
|
||||
class Node {
|
||||
public:
|
||||
T data;
|
||||
Node* next;
|
||||
|
||||
Node(T data) : data(data), next(nullptr) {}
|
||||
};
|
||||
#endif //MISC_TEMPLATES_H
|
||||
Reference in New Issue
Block a user