Fix build error due to changing app-common
[profile/tv/apps/native/filebrowser.git] / src / data / FileInfo.cpp
index 3ea0788..034fef2 100644 (file)
 * limitations under the License.
 */
 
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
 #include "dbg.h"
-#include "i18n.h"
+#include <AppCommon.h>
 #include "common.h"
-#include <media_content.h>
-
-#include "ExtNameInfo.h"
 #include "FileInfo.h"
 
 
@@ -32,10 +29,12 @@ struct SFileInfo {
 
 bool CFileInfo::Create(void)
 {
-       ASSERT(!m);
+       if (m)
+               return false;
 
        m = new SFileInfo;
-       ASSERT(m);
+       if (!m)
+               return false;
 
        memset(m, 0, sizeof(SFileInfo));
 
@@ -51,7 +50,8 @@ bool CFileInfo::Create(void)
 
 void CFileInfo::Destroy(void)
 {
-       ASSERT(m);
+       if (!m)
+               return;
 
        CExtNameInfo::Destroy();
 
@@ -86,7 +86,8 @@ groups gType(media_content_type_e type)
 
 bool CFileInfo::Duplicate(CNameInfo* obj)
 {
-       ASSERT(m);
+       if (!m)
+               return false;
 
        if (!CExtNameInfo::Duplicate(obj))
                return false;
@@ -97,7 +98,8 @@ bool CFileInfo::Duplicate(CNameInfo* obj)
 
 bool CFileInfo::SetLoadInfo(media_info_h handle)
 {
-       ASSERT(m);
+       if (!m)
+               return false;
 
        m->handle = handle;
        return true;
@@ -105,7 +107,8 @@ bool CFileInfo::SetLoadInfo(media_info_h handle)
 
 bool CFileInfo::Load(void)
 {
-       ASSERT(m);
+       if (!m)
+               return false;
 
        bool ret = false;
        do {