this unique pointer differs from the STL, because it allows weak pointers to it, which cannot be lock()ed.
under the hood, it's just a SP that cannot be referenced.
In file included from src/animation/AnimatedVariable.cpp:1:
In file included from ./include/hyprutils/animation/AnimatedVariable.hpp:3:
./include/hyprutils/animation/AnimationConfig.hpp:17:60: error: implicit instantiation of undefined template 'std::basic_string<char>'
17 | std::string internalBezier = "";
| ^
/usr/include/c++/v1/__fwd/string.h:43:28: note: template is declared here
43 | class _LIBCPP_TEMPLATE_VIS basic_string;
| ^
In file included from src/animation/AnimatedVariable.cpp:1:
In file included from ./include/hyprutils/animation/AnimatedVariable.hpp:3:
./include/hyprutils/animation/AnimationConfig.hpp:18:60: error: implicit instantiation of undefined template 'std::basic_string<char>'
18 | std::string internalStyle = "";
| ^
/usr/include/c++/v1/__fwd/string.h:43:28: note: template is declared here
43 | class _LIBCPP_TEMPLATE_VIS basic_string;
| ^
A signal called is allowed to free ourselves, in which case we're not allowed to use this anymore. Only perform the housekeeping of removing stale events before emit, and in registerListener.
* sharedptr: dont downcast ptr implentation
avoid runtime errors of wrong downcasts by adding a underlaying ptr data
getter and only cast the data, downcasting the implentation type isnt
inherited from eachother, while the intention was do upcast/downcast
a derived class to a base class. found with UBSAN "runtime error:
downcast of address which does not point to an object of type
"CSharedPointer_::impl<IKeyboard>" note: object is of type
"Hyprutils::Memory::CSharedPointer_::impl<CKeyboard>"
also make dataNonNull check against != nullptr.
* sharedptr: use reinterpret_cast instead of c style
make it more type safe, C style casts tries every single one until one
works, or not. compilers also produces better warnings/errors when using
c++ casts in favour of C style ones.