Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/WolfireGames/overgrowth.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Asset/assetbase.cpp')
-rw-r--r--Source/Asset/assetbase.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/Source/Asset/assetbase.cpp b/Source/Asset/assetbase.cpp
index 867bcfa1..b7d9f564 100644
--- a/Source/Asset/assetbase.cpp
+++ b/Source/Asset/assetbase.cpp
@@ -30,14 +30,11 @@
#include <cxxabi.h>
#endif
-Asset::Asset(AssetManager* owner, uint32_t asset_id):
-asset_id(asset_id),
-owner(owner) {
-
+Asset::Asset(AssetManager* owner, uint32_t asset_id) : asset_id(asset_id),
+ owner(owner) {
}
-Asset::~Asset()
-{
+Asset::~Asset() {
/*
if( ref_count_ != 0 )
{
@@ -59,18 +56,16 @@ Asset::~Asset()
*/
}
-void Asset::IncrementRefCount()
-{
- if( owner ) {
+void Asset::IncrementRefCount() {
+ if (owner) {
owner->IncrementAsset(asset_id);
} else {
LOGE << "This asset was orphaned before it was destroyed, someone was holding a reference too long" << std::endl;
}
}
-void Asset::DecrementRefCount()
-{
- if( owner ) {
+void Asset::DecrementRefCount() {
+ if (owner) {
owner->DecrementAsset(asset_id);
} else {
LOGE << "This asset was orphaned before it was destroyed, someone was holding a reference too long" << std::endl;