Updated all cpp files to new format
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / rendering / text-backend-impl.cpp
index 5214141..0e0d3a8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
@@ -19,8 +19,8 @@
 #include <dali-toolkit/internal/text/rendering/text-backend-impl.h>
 
 // EXTERNAL INCLUDES
-#include <dali/integration-api/debug.h>
 #include <dali/devel-api/common/singleton-service.h>
+#include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/text/rendering-backend.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 namespace Internal
 {
-
 struct Backend::Impl
 {
   int temp; // placeholder for future backend implemenations
 };
 
 Backend::Backend()
-: mImpl( NULL )
+: mImpl(NULL)
 {
   mImpl = new Impl();
 }
@@ -61,32 +57,32 @@ Dali::Toolkit::Text::Backend Backend::Get()
 {
   Dali::Toolkit::Text::Backend backendHandle;
 
-  Dali::SingletonService service( SingletonService::Get() );
-  if ( service )
+  Dali::SingletonService service(SingletonService::Get());
+  if(service)
   {
     // Check whether the singleton is already created
-    Dali::BaseHandle handle = service.GetSingleton( typeid( Dali::Toolkit::Text::Backend ) );
+    Dali::BaseHandle handle = service.GetSingleton(typeid(Dali::Toolkit::Text::Backend));
     if(handle)
     {
       // If so, downcast the handle
-      Backend* impl = dynamic_cast< Dali::Toolkit::Text::Internal::Backend* >( handle.GetObjectPtr() );
-      backendHandle = Dali::Toolkit::Text::Backend( impl );
+      Backend* impl = dynamic_cast<Dali::Toolkit::Text::Internal::Backend*>(handle.GetObjectPtr());
+      backendHandle = Dali::Toolkit::Text::Backend(impl);
     }
     else // create and register the object
     {
-      backendHandle = Dali::Toolkit::Text::Backend( new Backend );
-      service.Register( typeid( backendHandle ), backendHandle );
+      backendHandle = Dali::Toolkit::Text::Backend(new Backend);
+      service.Register(typeid(backendHandle), backendHandle);
     }
   }
 
   return backendHandle;
 }
 
-RendererPtr Backend::NewRenderer( unsigned int renderingType )
+RendererPtr Backend::NewRenderer(unsigned int renderingType)
 {
   RendererPtr renderer;
 
-  switch( renderingType )
+  switch(renderingType)
   {
     case Dali::Toolkit::DevelText::RENDERING_SHARED_ATLAS:
     {
@@ -106,7 +102,7 @@ RendererPtr Backend::NewRenderer( unsigned int renderingType )
 
     default:
     {
-      DALI_LOG_WARNING( "Unknown renderer type: %d\n", renderingType );
+      DALI_LOG_WARNING("Unknown renderer type: %d\n", renderingType);
       break;
     }
   }