OSDN Git Service

Fix Warning C26444 Avoid unnamed objects with custom construction and destruction...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 5 Jan 2019 13:46:00 +0000 (22:46 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 5 Jan 2019 13:46:00 +0000 (22:46 +0900)
Src/ConfigLog.cpp
Src/PropBackups.cpp

index 6ced800..9b84030 100644 (file)
@@ -261,10 +261,10 @@ void CConfigLog::WriteVersionOf1(int indent, const String& path)
 void CConfigLog::WriteWinMergeConfig()
 {
        TempFile tmpfile;
-       tmpfile.Create();
-       GetOptionsMgr()->ExportOptions(tmpfile.GetPath(), true);
+       String tmppath = tmpfile.Create();
+       GetOptionsMgr()->ExportOptions(tmppath, true);
        UniMemFile ufile;
-       if (!ufile.OpenReadOnly(tmpfile.GetPath()))
+       if (!ufile.OpenReadOnly(tmppath))
                return;
        String line;
        bool lossy;
index 644665a..d0b27b5 100644 (file)
@@ -65,7 +65,7 @@ void PropBackups::ReadOptions()
  */
 void PropBackups::WriteOptions()
 {
-       strutils::trim_ws(m_sGlobalFolder);
+       m_sGlobalFolder = strutils::trim_ws(m_sGlobalFolder);
        if (m_sGlobalFolder.length() > 3)
                m_sGlobalFolder = paths::AddTrailingSlash(m_sGlobalFolder);