@@ -72,7 +72,7 @@ using namespace std;
7272*/
7373void CProfile::Init ( void )
7474{
75- m_strProfileName = L" " ;
75+ m_strProfileName. clear () ;
7676 m_ProfileData.clear ();
7777 m_bRead = true ;
7878 return ;
@@ -100,17 +100,17 @@ void CProfile::ReadOneline(
100100 // セクション取得
101101 // Jan. 29, 2004 genta compare使用
102102 if ( line.compare ( 0 , 1 , LTEXT (" [" ) ) == 0
103- && line.find ( LTEXT (" = " ) ) == line.npos
104- && line.find ( LTEXT (" ] " ) ) == ( line.size () - 1 ) ) {
103+ && line.find ( LTEXT (' = ' ) ) == line.npos
104+ && line.find ( LTEXT (' ] ' ) ) == ( line.size () - 1 ) ) {
105105 Section Buffer;
106106 Buffer.strSectionName = line.substr ( 1 , line.size () - 1 - 1 );
107107 m_ProfileData.push_back ( Buffer );
108108 }
109109 // エントリ取得
110110 else if ( !m_ProfileData.empty () ) { // 最初のセクション以前の行のエントリは無視
111- wstring::size_type idx = line.find ( LTEXT (" = " ) );
111+ wstring::size_type idx = line.find ( LTEXT (' = ' ) );
112112 if ( line.npos != idx ) {
113- m_ProfileData.back ().mapEntries .insert ( PAIR_STR_STR ( line.substr (0 ,idx), line.substr (idx+1 ) ) );
113+ m_ProfileData.back ().mapEntries .emplace ( line.substr (0 ,idx), line.substr (idx+1 ) );
114114 }
115115 }
116116}
@@ -247,7 +247,7 @@ bool CProfile::WriteProfile(
247247
248248 std::vector< wstring > vecLine;
249249 if ( NULL != pszComment ) {
250- vecLine.push_back ( LTEXT (" ;" ) + wstring ( pszComment ) ); // //->; 2008/5/24 Uchi
250+ vecLine.emplace_back ( LTEXT (" ;" ) + wstring ( pszComment ) ); // //->; 2008/5/24 Uchi
251251 vecLine.push_back ( LTEXT (" " ) );
252252 }
253253 for (auto iter = m_ProfileData.cbegin (); iter != m_ProfileData.cend (); iter++ ) {
0 commit comments