use modern construct 'override' in the derive class.
[platform/core/uifw/dali-core.git] / dali / internal / event / images / bitmap-compressed.h
index 874e976..c0c1ed7 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_COMPRESSED_BITMAP_H__
-#define __DALI_INTERNAL_COMPRESSED_BITMAP_H__
+#ifndef DALI_INTERNAL_COMPRESSED_BITMAP_H
+#define DALI_INTERNAL_COMPRESSED_BITMAP_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -29,7 +29,7 @@ namespace Internal
 {
 
 class BitmapCompressed;
-typedef IntrusivePtr<BitmapCompressed>        BitmapCompressedPtr;
+using BitmapCompressedPtr = IntrusivePtr<BitmapCompressed>;
 
 /**
  * BitmapCompressed class.
@@ -46,8 +46,8 @@ public:
    */
   BitmapCompressed( ResourcePolicy::Discardable discardable = ResourcePolicy::OWNED_RETAIN );
 
-  virtual const Bitmap::CompressedProfile* GetCompressedProfile() const { return this; }
-  virtual Bitmap::CompressedProfile* GetCompressedProfile() { return this; }
+  const Bitmap::CompressedProfile* GetCompressedProfile() const override { return this; }
+  Bitmap::CompressedProfile* GetCompressedProfile() override { return this; }
 
 private:
   /**
@@ -58,9 +58,9 @@ private:
    * @param[in] bufferSize    Buffer cpacity in pixels
    */
   void Initialize(Pixel::Format pixelFormat,
-                           unsigned int width,
-                           unsigned int height,
-                           const std::size_t bufferSize);
+                           uint32_t width,
+                           uint32_t height,
+                           uint32_t bufferSize);
 public:
   /**
    * (Re-)Allocate pixel buffer for the Bitmap. Any previously allocated pixel buffer
@@ -74,16 +74,16 @@ public:
    * @param[in] bufferSize    Buffer size in bytes
    * @return pixel buffer pointer
    */
-  virtual Dali::Integration::PixelBuffer* ReserveBufferOfSize( Pixel::Format pixelFormat,
-                                     const unsigned width,
-                                     const unsigned height,
-                                     const std::size_t numBytes );
+  Dali::Integration::PixelBuffer* ReserveBufferOfSize( Pixel::Format pixelFormat,
+                                     const uint32_t width,
+                                     const uint32_t height,
+                                     const uint32_t numBytes ) override;
 
   /**
    * Get the pixel buffer size in bytes
    * @return The buffer size in bytes.
    */
-  virtual std::size_t GetBufferSize() const
+  uint32_t GetBufferSize() const override
   {
     return mBufferSize;
   }
@@ -91,18 +91,18 @@ public:
   /**
    * See Dali::Integration::Bitmap::GetReleaseFunction()
    */
-  ReleaseFunction GetReleaseFunction(){ return FREE; }
+  ReleaseFunction GetReleaseFunction() override{ return FREE; }
 
 protected:
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
-  virtual ~BitmapCompressed();
+  ~BitmapCompressed() override;
 
 private:
 
-  std::size_t mBufferSize;
+  uint32_t mBufferSize;
 
   BitmapCompressed(const BitmapCompressed& other);  ///< defined private to prevent use
   BitmapCompressed& operator = (const BitmapCompressed& other); ///< defined private to prevent use
@@ -115,4 +115,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_COMPRESSED_BITMAP_H__
+#endif // DALI_INTERNAL_COMPRESSED_BITMAP_H