[openrtm-commit:02249] r2857 - in branches/DEV_IQ_2016/OpenRTM-aist/src/lib: coil/common coil/posix/coil coil/win32/coil rtm

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 1月 18日 (水) 13:58:23 JST


Author: sec_fukai
Date: 2017-01-18 13:58:23 +0900 (Wed, 18 Jan 2017)
New Revision: 2857

Modified:
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/TimeMeasure.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/TimeValue.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/UUID.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/OS.h
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Task.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/UUID.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ExtTrigExecutionContext.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/Manager.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/NVUtil.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/NumberingPolicy.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTObject.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/SdoConfiguration.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/SystemLogger.cpp
Log:
[compat,->DEV_IQ_2016]Modify coding style. refs #3816

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/TimeMeasure.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/TimeMeasure.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/TimeMeasure.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -133,8 +133,8 @@
                                   double &mean_interval,
                                   double &stddev)
   {
-    max_interval = (double)0;
-    min_interval = (double)ULLONG_MAX;
+    max_interval = static_cast<double>(0);
+    min_interval = static_cast<double>(ULLONG_MAX);
 
     double sum = 0;
     double sq_sum = 0;

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/TimeValue.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/TimeValue.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/TimeValue.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -45,15 +45,15 @@
   {
     double dbHalfAdj;
     if ( timeval >= 0 )
-      {
+    {
         dbHalfAdj = +0.5;
-      }
+    }
     else
-      {
+    {
         dbHalfAdj = -0.5;
-      }
+    }
     m_sec = (long int)timeval;
-    m_usec = (long)((timeval - (double)m_sec)
+    m_usec = (long)((timeval - static_cast<double>(m_sec))
                     * TIMEVALUE_ONE_SECOND_IN_USECS + dbHalfAdj);
     normalize();
   }
@@ -139,8 +139,8 @@
       }
 
     m_sec = (long)time;
-    m_usec = (long)((time -
-                     (double)m_sec)*TIMEVALUE_ONE_SECOND_IN_USECS + dbHalfAdj);
+    m_usec = (long)((time - static_cast<double>(m_sec)) *
+                     TIMEVALUE_ONE_SECOND_IN_USECS + dbHalfAdj);
     normalize();
     return *this;
   }
@@ -154,7 +154,8 @@
    */
   TimeValue::operator double() const
   {
-    return (double)m_sec + ((double)m_usec/TIMEVALUE_ONE_SECOND_IN_USECS);
+    return static_cast<double>(m_sec) +
+          (static_cast<double>(m_usec) / TIMEVALUE_ONE_SECOND_IN_USECS);
   }
 
   /*!

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/UUID.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/UUID.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/UUID.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -119,7 +119,8 @@
 
   UUID::UUID(uuid_t *uuid)
   {
-    strncpy((char *)this->_uuid, (char *)(*uuid), sizeof(this->_uuid));
+    strncpy(reinterpret_cast<char *>(this->_uuid),
+            reinterpret_cast<char *>(*uuid), sizeof(this->_uuid));
   }
 
   const char* UUID::to_string()

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -178,7 +178,7 @@
         NULL,
         dwcode,
         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-        (char *)cstr,
+        reinterpret_cast<char *>(cstr),
         256,
         NULL
     );

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/OS.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/OS.h	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/OS.h	2017-01-18 04:58:23 UTC (rev 2857)
@@ -103,11 +103,11 @@
       }
     
     sprintf(name->release, os,
-            (int) version_info.dwMajorVersion,
-            (int) version_info.dwMinorVersion);
+            static_cast<int>(version_info.dwMajorVersion),
+            static_cast<int>(version_info.dwMinorVersion));
 
     sprintf(name->version, "Build %d %s",
-            (int) version_info.dwBuildNumber,
+            static_cast<int>(version_info.dwBuildNumber),
             version_info.szCSDVersion);
 
     // name.machine
@@ -297,13 +297,13 @@
         return(-1);
       }
     }                    /* option letter okay? */
-    if ((optopt = (int)*place++) == (int)':' ||
+    if ((optopt = static_cast<int>(*place++)) == static_cast<int>(':') ||
         !(oli = strchr(ostr, optopt))) {
       /*
        * if the user didn't specify '-' as an option,
        * assume it means -1 (EOF).
        */
-      if (optopt == (int)'-')
+      if (optopt == static_cast<int>('-'))
         return(-1);
       if (!*place)
         ++optind;

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -79,8 +79,9 @@
           if (hp->h_addrtype == AF_INET)
             {
               struct sockaddr_in addr;
-              memset((char*)&addr, 0, sizeof(addr));
-              memcpy((char*)&addr.sin_addr, hp->h_addr_list[i], hp->h_length);
+              memset(reinterpret_cast<char*>(&addr), 0, sizeof(addr));
+              memcpy(reinterpret_cast<char*>(&addr.sin_addr),
+                              hp->h_addr_list[i], hp->h_length);
               dest_addr = inet_ntoa(addr.sin_addr);
               break;
             }
@@ -95,7 +96,8 @@
     if (NO_ERROR != GetBestInterface(ipaddress, &bestifindex)) { return false; }
         
     PMIB_IPADDRTABLE ipaddr_table;
-    ipaddr_table = (MIB_IPADDRTABLE *) MALLOC(sizeof (MIB_IPADDRTABLE));
+    ipaddr_table = 
+          reinterpret_cast<MIB_IPADDRTABLE *>(MALLOC(sizeof (MIB_IPADDRTABLE)));
     if (ipaddr_table == 0) { return false; }
 
     // Make an initial call to GetIpAddrTable to get the
@@ -104,12 +106,12 @@
     if (GetIpAddrTable(ipaddr_table, &size, 0) == ERROR_INSUFFICIENT_BUFFER)
       {
         FREE(ipaddr_table);
-        ipaddr_table = (MIB_IPADDRTABLE *) MALLOC(size);
+        ipaddr_table = reinterpret_cast<MIB_IPADDRTABLE *>(MALLOC(size));
       }
     if (ipaddr_table == 0) { return false; }
     if (GetIpAddrTable(ipaddr_table, &size, 0) != NO_ERROR) { return false; }
     
-    for (int i(0); i < (int) ipaddr_table->dwNumEntries; ++i)
+    for (int i(0); i < static_cast<int>(ipaddr_table->dwNumEntries); ++i)
       {
         if (bestifindex == ipaddr_table->table[i].dwIndex)
           {

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Task.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Task.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Task.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -96,7 +96,7 @@
            (HANDLE)::_beginthreadex(NULL, // security
            0, //stuck size
            Task::svc_run, // func
-           (void*)this, // argument
+           reinterpret_cast<void*>ethis), // argument
            0, // flag (0 or CREATE_SUSPEND)
            NULL); //thread descripter
         ++m_count;

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h	2017-01-18 04:58:23 UTC (rev 2857)
@@ -125,7 +125,7 @@
 
     tv.tv_sec = interval.sec();
     tv.tv_usec = interval.usec();
-    iret = ::select((int)ssoc+1, &mask, NULL, NULL, &tv);
+    iret = ::select(static_cast<int>(ssoc+1), &mask, NULL, NULL, &tv);
     if ( iret == SOCKET_ERROR ) 
     {
       iret = ::WSAGetLastError();
@@ -196,7 +196,7 @@
     
     tv.tv_sec = usec / 1000000;
     tv.tv_usec = usec % 1000000;
-    iret = ::select((int)ssoc+1, &mask, NULL, NULL, &tv);
+    iret = ::select(static_cast<int>(ssoc+1), &mask, NULL, NULL, &tv);
     if ( iret == SOCKET_ERROR ) 
     {
       iret = ::WSAGetLastError();

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/UUID.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/UUID.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/UUID.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -57,7 +57,7 @@
    */
   UUID::~UUID()
   {
-    ::RpcStringFreeA((RPC_CSTR*)&m_uuidstr);
+    ::RpcStringFreeA(reinterpret_cast<RPC_CSTR*>(&m_uuidstr));
   }
 
   /*!
@@ -69,7 +69,7 @@
    */
   const char* UUID::to_string()
   {
-    if (::UuidToStringA(&m_uuid, (RPC_CSTR*)&m_uuidstr)
+    if (::UuidToStringA(&m_uuid, reinterpret_cast<RPC_CSTR*>(&m_uuidstr))
        != RPC_S_OK)
       {
         return 0;

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ExtTrigExecutionContext.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ExtTrigExecutionContext.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ExtTrigExecutionContext.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -129,9 +129,9 @@
         coil::TimeValue period(getPeriod());
         if (1) //count > 1000)
           {
-            RTC_PARANOID(("Period:    %f [s]", (double)period));
-            RTC_PARANOID(("Execution: %f [s]", (double)(t1 - t0)));
-            RTC_PARANOID(("Sleep:     %f [s]", (double)(period - (t1 - t0))));
+            RTC_PARANOID(("Period:    %f [s]", static_cast<double>(period)));
+            RTC_PARANOID(("Execution: %f [s]", static_cast<double>(t1 - t0)));
+            RTC_PARANOID(("Sleep:     %f [s]", static_cast<double>(period - (t1 - t0))));
           }
         coil::TimeValue t2(coil::gettimeofday());
         if (period > (t1 - t0))
@@ -142,7 +142,7 @@
         if (1) //count > 1000)
           {
             coil::TimeValue t3(coil::gettimeofday());
-            RTC_PARANOID(("Slept:       %f [s]", (double)(t3 - t2)));
+            RTC_PARANOID(("Slept:       %f [s]", static_cast<double>(t3 - t2)));
             count = 0;
           }
         ++count;

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/Manager.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/Manager.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/Manager.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -1413,7 +1413,7 @@
         m_pORB = CORBA::ORB_init(argc, argv);
         // Get the RootPOA
         CORBA::Object_var obj =
-        m_pORB->resolve_initial_references((char*)"RootPOA");
+        m_pORB->resolve_initial_references(const_cast<char*>("RootPOA"));
         m_pPOA = PortableServer::POA::_narrow(obj);
         if (CORBA::is_nil(m_pPOA))
           {

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ManagerServant.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -786,7 +786,7 @@
 #ifndef ORB_IS_RTORB
         obj = m_mgr.theORB()->resolve_initial_references("omniINSPOA");
 #else // ROB_IS_RTORB
-        obj = m_mgr.theORB()->resolve_initial_references((char*)"omniINSPOA");
+        obj = m_mgr.theORB()->resolve_initial_references(const_cast<char*>("omniINSPOA"));
 #endif // ORB_IS_RTORB
         PortableServer::POA_ptr poa = PortableServer::POA::_narrow(obj);
         poa->the_POAManager()->activate();
@@ -798,7 +798,7 @@
         id = PortableServer::string_to_ObjectId(config["manager.name"].c_str());
 #else // ORB_IS_RTORB
         id = PortableServer::
-          string_to_ObjectId((char *)config["manager.name"].c_str());
+          string_to_ObjectId(reinterpret_cast<char*>(config["manager.name"].c_str()));
 #endif // ORB_IS_RTORB
 
         // Object activation

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/NVUtil.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/NVUtil.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/NVUtil.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -121,7 +121,7 @@
 #ifndef ORB_IS_RTORB
         nv[i].name = CORBA::string_dup(keys[i].c_str());
 #else // ORB_IS_RTORB
-        nv[i].name = (char *)keys[i].c_str();
+        nv[i].name = reinterpret_cast<char *>(keys[i].c_str());
 #endif // ORB_IS_RTORB
         nv[i].value <<= prop[keys[i]].c_str();
       }

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/NumberingPolicy.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/NumberingPolicy.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/NumberingPolicy.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -46,7 +46,7 @@
     {
       (void)(e);
       m_objects.push_back(obj);
-      return coil::otos((int)(m_objects.size() - 1));
+      return coil::otos(static_cast<int>(m_objects.size() - 1));
     }
 }
 

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/OutPortCorbaCdrProvider.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -175,7 +175,7 @@
         cdr.get_octet_array(&((*data)[0]), len);
 #else
         data->length(len);
-        cdr.get_octet_array((char *)&((*data)[0]), (int)len);
+        cdr.get_octet_array(reinterpret_cast<char *>(&((*data)[0]), static_cast<int>(len)));
 #endif // ORB_IS_RTORB
       }
 

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTObject.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTObject.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTObject.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -724,12 +724,18 @@
           CORBA::string_dup(m_properties["category"].c_str());
         profile->port_profiles = m_portAdmin.getPortProfileList();
 #else // ORB_IS_RTORB
-        profile->instance_name = (char *)m_properties["instance_name"].c_str();
-        profile->type_name     = (char *)m_properties["type_name"].c_str();
-        profile->description   = (char *)m_properties["description"].c_str();
-        profile->version       = (char *)m_properties["version"].c_str();
-        profile->vendor        = (char *)m_properties["vendor"].c_str();
-        profile->category      = (char *)m_properties["category"].c_str();
+        profile->instance_name =
+               reinterpret_cast<char *>(m_properties["instance_name"].c_str());
+        profile->type_name     =
+               reinterpret_cast<char *>(m_properties["type_name"].c_str());
+        profile->description   =
+               reinterpret_cast<char *>(m_properties["description"].c_str());
+        profile->version       =
+               reinterpret_cast<char *>(m_properties["version"].c_str());
+        profile->vendor        =
+               reinterpret_cast<char *>(m_properties["vendor"].c_str());
+        profile->category      =
+               reinterpret_cast<char *>(m_properties["category"].c_str());
         PortProfileList ppl    = m_portAdmin.getPortProfileList();
         profile->port_profiles = ppl._retn();
 #endif // ORB_IS_RTORB
@@ -1466,7 +1472,8 @@
 #ifndef ORB_IS_RTORB
     m_profile.instance_name = m_properties["instance_name"].c_str();
 #else // ORB_IS_RTORB
-    m_profile.instance_name = (char *)m_properties["instance_name"].c_str();
+    m_profile.instance_name =
+            reinterpret_cast<char *>(m_properties["instance_name"].c_str());
 #endif // ORB_IS_RTORB
   }
 
@@ -1529,12 +1536,18 @@
     m_profile.vendor        = m_properties["vendor"].c_str();
     m_profile.category      = m_properties["category"].c_str();
 #else // ORB_IS_RTORB
-    m_profile.instance_name = (char*)m_properties["instance_name"].c_str();
-    m_profile.type_name     = (char*)m_properties["type_name"].c_str();
-    m_profile.description   = (char*)m_properties["description"].c_str();
-    m_profile.version       = (char*)m_properties["version"].c_str();
-    m_profile.vendor        = (char*)m_properties["vendor"].c_str();
-    m_profile.category      = (char*)m_properties["category"].c_str();
+    m_profile.instance_name =
+            reinterpret_cast<char*>(m_properties["instance_name"].c_str());
+    m_profile.type_name     =
+            reinterpret_cast<char*>(m_properties["type_name"].c_str());
+    m_profile.description   =
+            reinterpret_cast<char*>(m_properties["description"].c_str());
+    m_profile.version       =
+            reinterpret_cast<char*>(m_properties["version"].c_str());
+    m_profile.vendor        =
+            reinterpret_cast<char*>(m_properties["vendor"].c_str());
+    m_profile.category      =
+            reinterpret_cast<char*>(m_properties["category"].c_str());
 #endif //ORB_IS_RTORB
   }
 

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/SdoConfiguration.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/SdoConfiguration.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/SdoConfiguration.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -83,8 +83,8 @@
     conf.description = CORBA::string_dup(prop["description"].c_str());
     conf.id = CORBA::string_dup(prop.getName());
 #else // ORB_IS_RTORB
-    conf.description = (char *)prop["description"].c_str();
-    conf.id = (char *)prop.getName();
+    conf.description = reinterpret_cast<char *>(prop["description"].c_str());
+    conf.id = reinterpret_cast<char *>(prop.getName());
 #endif // ORB_IS_RTORB
     NVUtil::copyFromProperties(conf.configuration_data, prop);
   }

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/SystemLogger.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/SystemLogger.cpp	2017-01-18 04:28:17 UTC (rev 2856)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/SystemLogger.cpp	2017-01-18 04:58:23 UTC (rev 2857)
@@ -167,9 +167,9 @@
       {
         char msec[4];
 #ifdef WIN32
-        _snprintf(msec, 4, "%03d", (int)(tm.usec() / 1000));
+        _snprintf(msec, 4, "%03d", static_cast<int>(tm.usec() / 1000));
 #else
-        snprintf(msec, 4, "%03d", (int)(tm.usec() / 1000));
+        snprintf(msec, 4, "%03d", static_cast<int>(tm.usec() / 1000));
 #endif
         coil::replaceString(fmt, "#m#", msec);
       }
@@ -178,10 +178,10 @@
         char usec[4];
 #ifdef WIN32
         _snprintf(usec, 4, "%03d",
-                 (int)(tm.usec() - ((tm.usec() / 1000) * 1000)));
+                 static_cast<int>(tm.usec() - ((tm.usec() / 1000) * 1000)));
 #else
         snprintf(usec, 4, "%03d",
-                 (int)(tm.usec() - ((tm.usec() / 1000) * 1000)));
+                 static_cast<int>(tm.usec() - ((tm.usec() / 1000) * 1000)));
 #endif
         coil::replaceString(fmt, "#u#", usec);
       }



More information about the openrtm-commit mailing list