[dali_1.2.40] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / public-api / common / dali-common.cpp
index c6607f7..78dd20d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 
-namespace
-{
-const int MAX_NUM_STACK_FRAMES = 25;
-}
-
 namespace Dali
 {
 
 #if defined(BACKTRACE_ENABLED)
 
+namespace
+{
+const int MAX_NUM_STACK_FRAMES = 25;
+}
+
 std::string Demangle(const char* symbol)
 {
   std::string result;
@@ -69,7 +69,7 @@ std::string Demangle(const char* symbol)
       size_t tokenLength = endOfToken - startOfToken;
 
       // Allocate space for symbol
-      char *mangledSymbol = (char*)malloc(tokenLength+1u);
+      char *mangledSymbol = reinterpret_cast< char* >( malloc( tokenLength + 1u ) );
       if(mangledSymbol != NULL)
       {
         strncpy(mangledSymbol, startOfToken, tokenLength);