[keel] Cleanup
This commit is contained in:
parent
6522cf8a43
commit
afa3a13d41
@ -14,8 +14,6 @@
|
|||||||
#include <ox/std/hashmap.hpp>
|
#include <ox/std/hashmap.hpp>
|
||||||
#include <ox/std/utility.hpp>
|
#include <ox/std/utility.hpp>
|
||||||
|
|
||||||
#include "validation.hpp"
|
|
||||||
|
|
||||||
namespace keel {
|
namespace keel {
|
||||||
|
|
||||||
class AssetManager;
|
class AssetManager;
|
||||||
@ -190,7 +188,7 @@ class AssetManager {
|
|||||||
private:
|
private:
|
||||||
class AssetTypeManagerBase: public ox::SignalHandler {
|
class AssetTypeManagerBase: public ox::SignalHandler {
|
||||||
public:
|
public:
|
||||||
virtual ~AssetTypeManagerBase() = default;
|
~AssetTypeManagerBase() override = default;
|
||||||
|
|
||||||
virtual void gc() noexcept = 0;
|
virtual void gc() noexcept = 0;
|
||||||
};
|
};
|
||||||
@ -217,7 +215,6 @@ class AssetManager {
|
|||||||
ox::Result<AssetRef<T>> loadAsset(ox::StringView const assetId) noexcept {
|
ox::Result<AssetRef<T>> loadAsset(ox::StringView const assetId) noexcept {
|
||||||
auto &p = m_cache[assetId];
|
auto &p = m_cache[assetId];
|
||||||
oxRequireM(obj, m_loader(assetId));
|
oxRequireM(obj, m_loader(assetId));
|
||||||
oxReturnError(ensureValid(obj));
|
|
||||||
if (!p) {
|
if (!p) {
|
||||||
p = ox::make_unique<AssetContainer<T>>(std::move(obj));
|
p = ox::make_unique<AssetContainer<T>>(std::move(obj));
|
||||||
} else {
|
} else {
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
#include <ox/std/def.hpp>
|
#include <ox/std/def.hpp>
|
||||||
#include <ox/std/error.hpp>
|
#include <ox/std/error.hpp>
|
||||||
#include <ox/std/string.hpp>
|
#include <ox/std/string.hpp>
|
||||||
#include <ox/claw/read.hpp>
|
|
||||||
#include <ox/claw/write.hpp>
|
|
||||||
|
|
||||||
#include "asset.hpp"
|
#include "asset.hpp"
|
||||||
#include "context.hpp"
|
#include "context.hpp"
|
||||||
@ -119,7 +117,6 @@ class Converter: public BaseConverter {
|
|||||||
ox::Result<ox::UPtr<Wrap>> convertBuffToPtr(
|
ox::Result<ox::UPtr<Wrap>> convertBuffToPtr(
|
||||||
keel::Context &ctx, ox::BufferView const&srcBuff) const noexcept final {
|
keel::Context &ctx, ox::BufferView const&srcBuff) const noexcept final {
|
||||||
oxRequireM(src, readAsset<SrcType>(srcBuff));
|
oxRequireM(src, readAsset<SrcType>(srcBuff));
|
||||||
oxReturnError(ensureValid(src));
|
|
||||||
auto dst = makeWrap<DstType>();
|
auto dst = makeWrap<DstType>();
|
||||||
oxReturnError(convert(ctx, src, wrapCast<DstType>(*dst)));
|
oxReturnError(convert(ctx, src, wrapCast<DstType>(*dst)));
|
||||||
return {std::move(dst)};
|
return {std::move(dst)};
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
* Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
* Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ox/claw/read.hpp>
|
|
||||||
|
|
||||||
#include <keel/media.hpp>
|
#include <keel/media.hpp>
|
||||||
#include <keel/typeconv.hpp>
|
#include <keel/typeconv.hpp>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user