27 lines
344 B
C++
27 lines
344 B
C++
|
|
#include "iwa/addon.hpp"
|
|
|
|
#include <vector>
|
|
|
|
namespace iwa
|
|
{
|
|
namespace
|
|
{
|
|
std::vector<Addon*>& getAddonsVector() noexcept
|
|
{
|
|
static std::vector<Addon*> addons;
|
|
return addons;
|
|
}
|
|
}
|
|
|
|
Addon::Addon()
|
|
{
|
|
getAddonsVector().push_back(this);
|
|
}
|
|
|
|
std::span<Addon* const> getAddons() noexcept
|
|
{
|
|
return getAddonsVector();
|
|
}
|
|
} // namespace iwa
|