mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-30 23:44:28 -04:00
Set Aurora config path
This commit is contained in:
@@ -4,5 +4,6 @@
|
||||
#include <aurora/aurora.h>
|
||||
|
||||
extern AuroraInfo auroraInfo;
|
||||
extern const char* configPath;
|
||||
|
||||
#endif // DUSK_DUSK_H
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#ifndef DUSK_SCOPE_HPP
|
||||
#define DUSK_SCOPE_HPP
|
||||
|
||||
namespace dusk {
|
||||
|
||||
/**
|
||||
* A simple value wrapper that will destroy the value at the end of its scope.
|
||||
* @tparam T The type of value contained.
|
||||
* @tparam Destructor The type of function used to destroy the value.
|
||||
*/
|
||||
template <typename T, typename Destructor>
|
||||
struct ScopeValue {
|
||||
T value;
|
||||
Destructor destructor;
|
||||
|
||||
explicit ScopeValue(T value, Destructor destructor) : value(value), destructor(destructor) {
|
||||
}
|
||||
|
||||
~ScopeValue() {
|
||||
destructor(value);
|
||||
}
|
||||
|
||||
constexpr operator T&() const noexcept {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // DUSK_SCOPE_HPP
|
||||
Reference in New Issue
Block a user