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:
parent
b146673c3d
commit
dea95c7339
12 changed files with 40 additions and 40 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue