Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 248 vs 249 for /trunk/Source Code/Core/Resources/ResourceCache.cpp

Diff revisions: vs.
  @@ -14,7 +14,7 @@
14 14
15 15 void ResourceCache::add(const std::string& name,Resource* const res){
16 16 UpgradableReadLock ur_lock(_creationMutex);
17 - if(res == NULL) {
17 + if(res == nullptr) {
18 18 ERROR_FN(Locale::get("ERROR_RESOURCE_CACHE_LOAD_RES"),name.c_str());
19 19 return;
20 20 }
  @@ -54,11 +54,11 @@
54 54 if(resDBiter != _resDB.end()){
55 55 return resDBiter->second;
56 56 }
57 - return NULL;
57 + return nullptr;
58 58 }
59 59
60 60 bool ResourceCache::scheduleDeletion(Resource* const resource,bool force){
61 - if(resource == NULL) return false;
61 + if(resource == nullptr) return false;
62 62 ResourceMap::const_iterator resDBiter = _resDB.find(resource->getName());
63 63 /// it's already deleted. Double-deletion should be safe
64 64 if(resDBiter == _resDB.end())
  @@ -72,7 +72,7 @@
72 72 }
73 73
74 74 bool ResourceCache::remove(Resource* const resource,bool force){
75 - assert(resource != NULL);
75 + assert(resource != nullptr);
76 76
77 77 std::string name(resource->getName());
78 78
  @@ -106,7 +106,7 @@
106 106 }
107 107
108 108 bool ResourceCache::load(Resource* const res, const std::string& name) {
109 - assert(res != NULL);
109 + assert(res != nullptr);
110 110 res->setName(name);
111 111 return true;
112 112 }