X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fimage-loader%2Fatlas-upload-observer.cpp;h=a12a23f5e71ef88dc823369b9cd9219579133329;hb=b3f769e350cf3c159ab22bd947f1e98d47cb4038;hp=f362edc633ef8c46cd1617e79a0a8686e759286e;hpb=1ff26466c5458cda1de2997cd4e27b014ff0275a;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/image-loader/atlas-upload-observer.cpp b/dali-toolkit/devel-api/image-loader/atlas-upload-observer.cpp index f362edc..a12a23f 100644 --- a/dali-toolkit/devel-api/image-loader/atlas-upload-observer.cpp +++ b/dali-toolkit/devel-api/image-loader/atlas-upload-observer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,49 +23,48 @@ namespace Dali { - namespace Toolkit { - AtlasUploadObserver::AtlasUploadObserver() -{} +{ +} AtlasUploadObserver::~AtlasUploadObserver() { // Notify the registerd ImageAtlas object about the destruction of observer. - const std::size_t size( mAtlasList.Count() ); - for( std::size_t i = 0; i < size; ++i ) + const std::size_t size(mAtlasList.Count()); + for(std::size_t i = 0; i < size; ++i) { - if( mAtlasList[i] ) + if(mAtlasList[i]) { - mAtlasList[i]->ObserverDestroyed( this ); + mAtlasList[i]->ObserverDestroyed(this); } } mAtlasList.Clear(); } -void AtlasUploadObserver::Register( Internal::ImageAtlas& imageAtlas ) +void AtlasUploadObserver::Register(Internal::ImageAtlas& imageAtlas) { // Add to the list so that the ImageAtlas could get notified in the destructor. // If the same atlas is exist in the list already, we would still save the duplicated copy. - mAtlasList.PushBack( &imageAtlas ); + mAtlasList.PushBack(&imageAtlas); } -void AtlasUploadObserver::Unregister( Internal::ImageAtlas& imageAtlas ) +void AtlasUploadObserver::Unregister(Internal::ImageAtlas& imageAtlas) { - const std::size_t size( mAtlasList.Count() ); - for( std::size_t i = 0; i < size; i++ ) + const std::size_t size(mAtlasList.Count()); + for(std::size_t i = 0; i < size; i++) { - if( mAtlasList[i] == &imageAtlas ) + if(mAtlasList[i] == &imageAtlas) { // Remove from list - mAtlasList.Erase( mAtlasList.Begin() + i ); + mAtlasList.Erase(mAtlasList.Begin() + i); // If there are duplicated copies of same pointer, only the first one is removed return; } } } -} +} // namespace Toolkit -} +} // namespace Dali