[openrtm-commit:02257] r2864 - 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日 (水) 16:25:30 JST
Author: sec_fukai
Date: 2017-01-18 16:25:30 +0900 (Wed, 18 Jan 2017)
New Revision: 2864
Modified:
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/crc.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/Routing.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h
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.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ConnectorListener.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/FactoryInit.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTC.h
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RingBuffer.h
Log:
[compat,->DEV_IQ_2016]Modify coding style. refs #3816
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/crc.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/crc.h 2017-01-18 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/crc.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -101,6 +101,6 @@
* @endif
*/
unsigned long crc32(const char* str, size_t len);
-}; //namespace coil
+}; // namespace coil
-#endif // COIL_CRC_H
+#endif // COIL_CRC_H
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/Routing.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/Routing.h 2017-01-18 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/Routing.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -120,5 +120,5 @@
bool ifname_to_ipaddr(std::string ifname, std::string& ipaddr);
- }; //namespace coil
-#endif // COIL_ROUTING_H
+ }; // namespace coil
+#endif // COIL_ROUTING_H
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h 2017-01-18 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -63,14 +63,14 @@
*/
explicit Mutex(const char * const name = 0)
{
- SECURITY_DESCRIPTOR sd_buffer;
- ::InitializeSecurityDescriptor(&sd_buffer,
- SECURITY_DESCRIPTOR_REVISION);
- ::SetSecurityDescriptorDacl (&sd_buffer, TRUE, 0, FALSE);
- m_Security_attr.nLength = sizeof(SECURITY_ATTRIBUTES);
- m_Security_attr.lpSecurityDescriptor = &sd_buffer;
- m_Security_attr.bInheritHandle = TRUE;
- mutex_ = ::CreateMutexA(&m_Security_attr, FALSE,name);
+ SECURITY_DESCRIPTOR sd_buffer;
+ ::InitializeSecurityDescriptor(&sd_buffer,
+ SECURITY_DESCRIPTOR_REVISION);
+ ::SetSecurityDescriptorDacl (&sd_buffer, TRUE, 0, FALSE);
+ m_Security_attr.nLength = sizeof(SECURITY_ATTRIBUTES);
+ m_Security_attr.lpSecurityDescriptor = &sd_buffer;
+ m_Security_attr.bInheritHandle = TRUE;
+ mutex_ = ::CreateMutexA(&m_Security_attr, FALSE, name);
}
@@ -138,7 +138,6 @@
{
case WAIT_ABANDONED:
return true;
- break;
case WAIT_OBJECT_0:
return false;
case WAIT_TIMEOUT:
@@ -176,4 +175,4 @@
Mutex& operator=(const Mutex &);
};
}; // namespace coil
-#endif // COIL_MUTEX_H
+#endif // COIL_MUTEX_H
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 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/OS.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -326,24 +326,36 @@
else
{ /* need an argument */
if (*place) /* no white space */
- optarg = place;
+ {
+ optarg = place;
+ }
else if (nargc <= ++optind)
{ /* no arg */
place = EMSG;
if (!(p = strrchr(*nargv, '/')))
- p = *nargv;
+ {
+ p = *nargv;
+ }
else
- ++p;
+ {
+ ++p;
+ }
if (*ostr == ':')
- return(BADARG);
+ {
+ return(BADARG);
+ }
if (opterr)
- fprintf(stderr,
+ {
+ fprintf(stderr,
"%s: option requires an argument -- %c\n",
p, optopt);
- return(BADCH);
+ return(BADCH);
+ }
}
else /* white space */
- optarg = nargv[optind];
+ {
+ optarg = nargv[optind];
+ }
place = EMSG;
++optind;
}
@@ -451,8 +463,8 @@
int optind; //! 処理対象引数
int opterr; //! エラー表示 0:抑止、1:表示
int optopt; //! オプション文字が足りない時、多い時にセットされる
-
+
private:
int m_argc;
char* const * m_argv;
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.h 2017-01-18 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Routing.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -57,5 +57,5 @@
*/
bool dest_to_endpoint(std::string dest_addr, std::string& endpoint);
-}; //namespace coil
-#endif // COIL_ROUTING_H
+}; // namespace coil
+#endif // COIL_ROUTING_H
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 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Time.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -97,7 +97,7 @@
WORD ver;
int iret;
- //The WSAStartup function initiates use of the Winsock DLL by a process.
+ // The WSAStartup function initiates use of the Winsock DLL by a process.
ver = MAKEWORD(2, 2);
iret = ::WSAStartup(ver, &wsa);
if ( iret != 0 )
@@ -105,9 +105,9 @@
return iret;
}
- //The socket function creates a socket that is bound to
- //a specific transport service provider.
- //It is assumed AF_INET because there is no AF_UNIX for Windows.
+ // The socket function creates a socket that is bound to
+ // a specific transport service provider.
+ // It is assumed AF_INET because there is no AF_UNIX for Windows.
ssoc = ::socket(AF_INET,
SOCK_STREAM,
0);
@@ -118,9 +118,9 @@
}
- //Initialize fd_set.
+ // Initialize fd_set.
FD_ZERO(&mask);
- //Register the reading socket.
+ // Register the reading socket.
FD_SET(ssoc, &mask);
tv.tv_sec = interval.sec();
@@ -129,18 +129,18 @@
if ( iret == SOCKET_ERROR )
{
iret = ::WSAGetLastError();
- //The closesocket function closes an existing socket.
+ // The closesocket function closes an existing socket.
::closesocket(ssoc);
- //The WSACleanup function terminates
- //use of the Winsock 2 DLL (Ws2_32.dll).
+ // The WSACleanup function terminates
+ // use of the Winsock 2 DLL (Ws2_32.dll).
::WSACleanup();
return iret;
}
- //The closesocket function closes an existing socket.
+ // The closesocket function closes an existing socket.
::closesocket(ssoc);
- //The WSACleanup function terminates use of the Winsock 2 DLL (Ws2_32.dll).
+ // The WSACleanup function terminates use of the Winsock 2 DLL (Ws2_32.dll).
::WSACleanup();
return iret;
}
@@ -175,7 +175,7 @@
fd_set mask;
SOCKET ssoc;
- //The WSAStartup function initiates use of the Winsock DLL by a process.
+ // The WSAStartup function initiates use of the Winsock DLL by a process.
ver = MAKEWORD(2, 2);
iret = ::WSAStartup(ver, &wsa);
if ( iret != 0 )
@@ -183,8 +183,8 @@
return iret;
}
- //The socket function creates a socket that is
- //bound to a specific transport service provider.
+ // The socket function creates a socket that is
+ // bound to a specific transport service provider.
ssoc = ::socket(AF_INET, SOCK_STREAM, 0);
if (ssoc == INVALID_SOCKET) {
iret = ::WSAGetLastError();
@@ -200,16 +200,16 @@
if ( iret == SOCKET_ERROR )
{
iret = ::WSAGetLastError();
- //The closesocket function closes an existing socket.
+ // The closesocket function closes an existing socket.
::closesocket(ssoc);
- //The WSACleanup function terminates
- //use of the Winsock 2 DLL (Ws2_32.dll).
+ // The WSACleanup function terminates
+ // use of the Winsock 2 DLL (Ws2_32.dll).
::WSACleanup();
return iret;
}
- //The closesocket function closes an existing socket.
+ // The closesocket function closes an existing socket.
::closesocket(ssoc);
- //The WSACleanup function terminates use of the Winsock 2 DLL (Ws2_32.dll).
+ // The WSACleanup function terminates use of the Winsock 2 DLL (Ws2_32.dll).
::WSACleanup();
return iret;
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ConnectorListener.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ConnectorListener.h 2017-01-18 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/ConnectorListener.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -917,6 +917,6 @@
*/
ConnectorListenerHolder connector_[CONNECTOR_LISTENER_NUM];
};
-};
+}; // namespace RTC
-#endif // RTC_CONNECTORLISTENER_H
+#endif // RTC_CONNECTORLISTENER_H
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h 2017-01-18 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/DefaultConfiguration.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -112,4 +112,4 @@
"sdo.service.consumer.enabled_service", "ALL",
""
};
-#endif //RTM_DEFAULTCONFIGURATION_H
+#endif // RTM_DEFAULTCONFIGURATION_H
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/FactoryInit.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/FactoryInit.h 2017-01-18 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/FactoryInit.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -18,4 +18,4 @@
#ifndef RTM_FACTORYINIT_H
#define RTM_FACTORYINIT_H
void FactoryInit();
-#endif //RTM_FACTORYINIT_H
+#endif // RTM_FACTORYINIT_H
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTC.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTC.h 2017-01-18 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTC.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -81,8 +81,8 @@
namespace RTC
{
typedef coil::Properties Properties;
-};
+}; // namespace RTC
//#endif // COMPAT_OPENRTM_0_4
-#endif // RTC_H
+#endif // RTC_H
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RingBuffer.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RingBuffer.h 2017-01-18 07:22:53 UTC (rev 2863)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RingBuffer.h 2017-01-18 07:25:30 UTC (rev 2864)
@@ -245,7 +245,7 @@
m_buffer.resize(n);
m_length = n;
this->reset();
- return ::RTC::BufferStatus::BUFFER_OK; //BUFFER_OK;
+ return ::RTC::BufferStatus::BUFFER_OK; // BUFFER_OK;
}
/*!
More information about the openrtm-commit
mailing list