Fix build error
[platform/framework/web/wrt-plugins-common.git] / src / CommonsJavaScript / PrivateObject.h
index d303d7a..8bd816a 100644 (file)
 
 namespace WrtDeviceApis {
 namespace CommonsJavaScript {
-
 template<class T>
 struct NoAcquire
 {
     void acquire(T*)
-    {
-    }
+    {}
+
   protected:
     ~NoAcquire()
-    {
-    }
+    {}
 };
 
 template<class T>
@@ -45,10 +43,10 @@ struct AcquireByProtect
         Assert(object && "Object passed to protect can't be NULL.");
         JSValueProtect(object->getContext(), object->getObject());
     }
+
   protected:
     ~AcquireByProtect()
-    {
-    }
+    {}
 };
 
 template<class T>
@@ -58,10 +56,10 @@ struct NoRelease
     {
         (void)object;
     }
+
   protected:
     ~NoRelease()
-    {
-    }
+    {}
 };
 
 template<class T>
@@ -71,10 +69,10 @@ struct ReleaseByDelete
     {
         delete object->getObject();
     }
+
   protected:
     ~ReleaseByDelete()
-    {
-    }
+    {}
 };
 
 template<class T>
@@ -85,10 +83,10 @@ struct ReleaseByUnprotect
         Assert(object && "Object passed to unprotect can't be NULL.");
         JSValueUnprotect(object->getContext(), object->getObject());
     }
+
   protected:
     ~ReleaseByUnprotect()
-    {
-    }
+    {}
 };
 
 template<class T>
@@ -97,8 +95,7 @@ struct NoOwnership : protected NoAcquire<T>,
 {
   protected:
     ~NoOwnership()
-    {
-    }
+    {}
 };
 
 template<class T>
@@ -107,8 +104,7 @@ struct OwnershipByAcquisition : protected NoAcquire<T>,
 {
   protected:
     ~OwnershipByAcquisition()
-    {
-    }
+    {}
 };
 
 template<class T>
@@ -117,8 +113,7 @@ struct OwnershipByProtection : protected AcquireByProtect<T>,
 {
   protected:
     ~OwnershipByProtection()
-    {
-    }
+    {}
 };
 
 template<class PrivateClass,
@@ -137,13 +132,14 @@ class PrivateObject : public DPL::Noncopyable,
      * @throw NullPointerException When object is pointer and is set to NULL.
      */
     PrivateObject(JSContextRef context,
-            const PrivateClass& object) :
+                  const PrivateClass& object) :
         m_context(context),
         m_object(object)
     {
         Assert(NULL != m_context && "Context is NULL.");
-        Assert(!Commons::IsNull<PrivateClass>::value(object) && "Object is NULL.");
-        acquire(this);
+        Assert(!Commons::IsNull<PrivateClass>::value(
+                   object) && "Object is NULL.");
+        this->acquire(this);
     }
 
     /**
@@ -151,7 +147,7 @@ class PrivateObject : public DPL::Noncopyable,
      */
     virtual ~PrivateObject()
     {
-        release(this);
+        this->release(this);
     }
 
     /**
@@ -198,8 +194,7 @@ class PrivateObject<void, NoOwnership> : private DPL::Noncopyable
      * Destroys instance of the object.
      */
     virtual ~PrivateObject()
-    {
-    }
+    {}
 
     /**
      * Gets stored JS context.
@@ -237,7 +232,6 @@ struct PrivateObjectT<void>
 {
     typedef PrivateObject<void, NoOwnership> Type;
 };
-
 } // CommonsJavaScript
 } // WrtDeviceApis