1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

Reduce transitive includes by moving a class

This commit is contained in:
sfan5 2025-03-26 19:47:40 +01:00
parent b146673c3d
commit dea95c7339
12 changed files with 40 additions and 40 deletions

View file

@ -5,26 +5,11 @@
#pragma once
#include "irrlichttypes.h"
#include "debug.h" // For assert()
#include "util/basic_macros.h"
#include <cassert>
#include <cstring>
#include <memory> // std::shared_ptr
#include <string_view>
template<typename T>
class ConstSharedPtr {
public:
ConstSharedPtr(T *ptr) : ptr(ptr) {}
ConstSharedPtr(const std::shared_ptr<T> &ptr) : ptr(ptr) {}
const T* get() const noexcept { return ptr.get(); }
const T& operator*() const noexcept { return *ptr.get(); }
const T* operator->() const noexcept { return ptr.get(); }
private:
std::shared_ptr<T> ptr;
};
template <typename T>
class Buffer
{