[openrtm-commit:02227] r2840 - branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 1月 16日 (月) 15:54:03 JST
Author: sec_fukai
Date: 2017-01-16 15:54:03 +0900 (Mon, 16 Jan 2017)
New Revision: 2840
Modified:
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/stringutil.cpp
branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/stringutil.h
Log:
[incompat,->DEV_IQ_2016] Modify argument from value to reference. refs #3805
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/stringutil.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/stringutil.cpp 2017-01-16 06:19:18 UTC (rev 2839)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/stringutil.cpp 2017-01-16 06:54:03 UTC (rev 2840)
@@ -171,7 +171,7 @@
* @brief Escape string
* @endif
*/
- std::string escape(const std::string str)
+ std::string escape(const std::string& str)
{
return for_each(str.begin(), str.end(), escape_functor()).str;
}
@@ -227,7 +227,7 @@
* @brief Unescape string
* @endif
*/
- std::string unescape(const std::string str)
+ std::string unescape(const std::string& str)
{
return for_each(str.begin(), str.end(), unescape_functor()).str;
}
@@ -319,8 +319,8 @@
* @brief Replace string
* @endif
*/
- unsigned int replaceString(std::string& str, const std::string from,
- const std::string to)
+ unsigned int replaceString(std::string& str, const std::string& from,
+ const std::string& to)
{
std::string::size_type pos(0);
unsigned int cnt(0);
Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/stringutil.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/stringutil.h 2017-01-16 06:19:18 UTC (rev 2839)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/stringutil.h 2017-01-16 06:54:03 UTC (rev 2840)
@@ -205,7 +205,7 @@
*
* @endif
*/
- std::string escape(const std::string str);
+ std::string escape(const std::string& str);
/*!
* @if jp
@@ -243,7 +243,7 @@
*
* @endif
*/
- std::string unescape(const std::string str);
+ std::string unescape(const std::string& str);
/*!
* @if jp
@@ -375,8 +375,8 @@
*
* @endif
*/
- unsigned int replaceString(std::string& str, const std::string from,
- const std::string to);
+ unsigned int replaceString(std::string& str, const std::string& from,
+ const std::string& to);
/*!
* @if jp
@@ -726,7 +726,7 @@
* @endif
*/
template <class T>
- bool hexToPtr(T*& ptr, const std::string str)
+ bool hexToPtr(T*& ptr, const std::string& str)
{
std::stringstream s;
if ((s << std::hex << str).fail()) { return false; }
More information about the openrtm-commit
mailing list