From c9ca96460735f02b0d2f50f0adc67facd6a5ad8a Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Sat, 14 Jan 2012 21:11:18 +0300 Subject: [PATCH] Replaced auto_ptr with scoped_ptr --- yg/resource_manager.cpp | 4 ++-- yg/resource_manager.hpp | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/yg/resource_manager.cpp b/yg/resource_manager.cpp index 52e7e5a1f2..9c2d10abdd 100644 --- a/yg/resource_manager.cpp +++ b/yg/resource_manager.cpp @@ -497,7 +497,7 @@ namespace yg LOG(LERROR, ("no params to init glyph caches.")); } - void ResourceManager::initStoragePool(StoragePoolParams const & p, auto_ptr & pool) + void ResourceManager::initStoragePool(StoragePoolParams const & p, scoped_ptr & pool) { if (p.isValid()) { @@ -512,7 +512,7 @@ namespace yg LOG(LINFO, ("no ", p.m_poolName, " resource")); } - void ResourceManager::initTexturePool(TexturePoolParams const & p, auto_ptr & pool) + void ResourceManager::initTexturePool(TexturePoolParams const & p, scoped_ptr & pool) { if (p.isValid()) { diff --git a/yg/resource_manager.hpp b/yg/resource_manager.hpp index 4c61dbbdfc..8e69daf8a0 100644 --- a/yg/resource_manager.hpp +++ b/yg/resource_manager.hpp @@ -1,10 +1,10 @@ #pragma once #include "../std/shared_ptr.hpp" +#include "../std/scoped_ptr.hpp" #include "../std/map.hpp" #include "../std/string.hpp" #include "../std/list.hpp" -#include "../std/auto_ptr.hpp" #include "../base/mutex.hpp" #include "../base/resource_pool.hpp" @@ -215,17 +215,17 @@ namespace yg threads::Mutex m_mutex; - auto_ptr m_primaryTextures; - auto_ptr m_fontTextures; - auto_ptr m_styleCacheTextures; - auto_ptr m_renderTargets; - auto_ptr m_guiThreadTextures; + scoped_ptr m_primaryTextures; + scoped_ptr m_fontTextures; + scoped_ptr m_styleCacheTextures; + scoped_ptr m_renderTargets; + scoped_ptr m_guiThreadTextures; - auto_ptr m_primaryStorages; - auto_ptr m_smallStorages; - auto_ptr m_blitStorages; - auto_ptr m_multiBlitStorages; - auto_ptr m_guiThreadStorages; + scoped_ptr m_primaryStorages; + scoped_ptr m_smallStorages; + scoped_ptr m_blitStorages; + scoped_ptr m_multiBlitStorages; + scoped_ptr m_guiThreadStorages; vector m_glyphCaches; @@ -237,7 +237,7 @@ namespace yg void initGlyphCaches(GlyphCacheParams const & p); - void initStoragePool(StoragePoolParams const & p, auto_ptr & pool); + void initStoragePool(StoragePoolParams const & p, scoped_ptr & pool); TStoragePool * primaryStorages(); TStoragePool * smallStorages(); @@ -245,7 +245,7 @@ namespace yg TStoragePool * multiBlitStorages(); TStoragePool * guiThreadStorages(); - void initTexturePool(TexturePoolParams const & p, auto_ptr & pool); + void initTexturePool(TexturePoolParams const & p, scoped_ptr & pool); TTexturePool * primaryTextures(); TTexturePool * fontTextures();