diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-26 18:23:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-26 18:23:54 +0300 |
commit | e6c4594bfd63d7480fa4c010e5336586c61c240f (patch) | |
tree | c7c07acfe0770cfb2095d9693a7b017033e3593f /plugins | |
parent | 1d8b5028056bbfe0dd3616162da30378f043c0c0 (diff) |
C++'17 compatibility mode enabled
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/BasicHistory/src/stdafx.h | 2 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/init.cpp | 4 | ||||
-rw-r--r-- | plugins/Db_autobackups/src/stdafx.h | 4 | ||||
-rw-r--r-- | plugins/Import/src/mcontacts.cpp | 2 | ||||
-rw-r--r-- | plugins/Import/src/patterns.cpp | 4 | ||||
-rw-r--r-- | plugins/Import/src/textjson.cpp | 2 | ||||
-rw-r--r-- | plugins/ListeningTo/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp | 8 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/DialogConfigEngine.cpp | 7 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/DialogConfigEngine.h | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeakConfig.cpp | 4 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/SpeakConfig.h | 2 |
12 files changed, 22 insertions, 20 deletions
diff --git a/plugins/BasicHistory/src/stdafx.h b/plugins/BasicHistory/src/stdafx.h index 34be3373c7..81269b85ff 100644 --- a/plugins/BasicHistory/src/stdafx.h +++ b/plugins/BasicHistory/src/stdafx.h @@ -10,6 +10,8 @@ #endif
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#define _HAS_AUTO_PTR_ETC 1
+
// Windows Header Files:
#include <windows.h>
#include <windowsx.h>
diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index 6af3359934..e7b7b7901e 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -61,7 +61,7 @@ static int makeDatabase(const wchar_t*) // returns 0 if the given profile has a valid header
static int grokHeader(const wchar_t *profile)
{
- std::auto_ptr<CDb3Mmap> db(new CDb3Mmap(profile, DBMODE_SHARED | DBMODE_READONLY));
+ std::unique_ptr<CDb3Mmap> db(new CDb3Mmap(profile, DBMODE_SHARED | DBMODE_READONLY));
if (db->Load(true) != ERROR_SUCCESS)
return EGROKPRF_CANTREAD;
@@ -116,7 +116,7 @@ LBL_Error: return pLink->Load(profile, false);
}
- std::auto_ptr<CDb3Mmap> db(new CDb3Mmap(profile, DBMODE_READONLY));
+ std::unique_ptr<CDb3Mmap> db(new CDb3Mmap(profile, DBMODE_READONLY));
if (db->Load(false) != ERROR_SUCCESS)
return nullptr;
diff --git a/plugins/Db_autobackups/src/stdafx.h b/plugins/Db_autobackups/src/stdafx.h index ad48212350..d166442589 100644 --- a/plugins/Db_autobackups/src/stdafx.h +++ b/plugins/Db_autobackups/src/stdafx.h @@ -6,11 +6,13 @@ #include <windows.h>
#include <shlobj.h>
#include <time.h>
+
+#include <string>
#include <vector>
#include <functional>
#include <filesystem>
-namespace fs = std::experimental::filesystem;
+namespace fs = std::filesystem;
#include <newpluginapi.h>
#include <m_clist.h>
diff --git a/plugins/Import/src/mcontacts.cpp b/plugins/Import/src/mcontacts.cpp index e2829e41bd..15673ca425 100644 --- a/plugins/Import/src/mcontacts.cpp +++ b/plugins/Import/src/mcontacts.cpp @@ -285,7 +285,7 @@ static int mc_grokHeader(const wchar_t *profile) static MDatabaseCommon* mc_load(const wchar_t *profile, BOOL) { - std::auto_ptr<CDbxMc> db(new CDbxMc()); + std::unique_ptr<CDbxMc> db(new CDbxMc()); if (db->Open(profile)) return nullptr; diff --git a/plugins/Import/src/patterns.cpp b/plugins/Import/src/patterns.cpp index 9f28b50645..8c67fc1d0c 100644 --- a/plugins/Import/src/patterns.cpp +++ b/plugins/Import/src/patterns.cpp @@ -53,7 +53,7 @@ void CMPlugin::LoadPattern(const wchar_t *pwszFileName) if (!GetPrivateProfileStringW(L"General", L"Name", L"", buf, _countof(buf), pwszFileName)) return; - std::auto_ptr<CImportPattern> pNew(new CImportPattern()); + std::unique_ptr<CImportPattern> pNew(new CImportPattern()); pNew->wszName = buf; pNew->iType = GetPrivateProfileIntW(L"General", L"Type", 1, pwszFileName); @@ -707,7 +707,7 @@ static int pattern_grokHeader(const wchar_t *profile) static MDatabaseCommon* pattern_load(const wchar_t *profile, BOOL) { - std::auto_ptr<CDbxPattern> db(new CDbxPattern()); + std::unique_ptr<CDbxPattern> db(new CDbxPattern()); if (db->Open(profile)) return nullptr; diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp index 035483431c..5e8564d785 100644 --- a/plugins/Import/src/textjson.cpp +++ b/plugins/Import/src/textjson.cpp @@ -216,7 +216,7 @@ static int mc_grokHeader(const wchar_t *profile) static MDatabaseCommon* mc_load(const wchar_t *profile, BOOL) { - std::auto_ptr<CDbxJson> db(new CDbxJson()); + std::unique_ptr<CDbxJson> db(new CDbxJson()); if (db->Open(profile)) return nullptr; diff --git a/plugins/ListeningTo/src/stdafx.h b/plugins/ListeningTo/src/stdafx.h index 2236e6a83d..bcfab528fe 100644 --- a/plugins/ListeningTo/src/stdafx.h +++ b/plugins/ListeningTo/src/stdafx.h @@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. # define __COMMONS_H__
#define _CRT_NONSTDC_NO_DEPRECATE
+#define _HAS_AUTO_PTR_ETC 1
#include <windows.h>
#include <time.h>
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp index 300bc365e2..a6902e6a55 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp @@ -892,7 +892,7 @@ SG15LightStatus CLCDConnectionLogitech::GetLightStatus() m_pConnectedDevice->GetIndex() != LGLCD_DEVICE_BW) //m_lcdDeviceDesc.deviceFamilyId != LGLCD_DEVICE_FAMILY_KEYBOARD_G15)
return status;
- byte *data = new byte[m_HIDCapabilities.FeatureReportByteLength];
+ BYTE *data = new BYTE[m_HIDCapabilities.FeatureReportByteLength];
data[0] = 0x02;
data[1] = 0x02;
@@ -936,7 +936,7 @@ void CLCDConnectionLogitech::SetMKeyLight(bool bM1, bool bM2, bool bM3, bool bMR m_pConnectedDevice->GetIndex() != LGLCD_DEVICE_BW) //m_lcdDeviceDesc.deviceFamilyId != LGLCD_DEVICE_FAMILY_KEYBOARD_G15)
return;
- byte *data = new byte[m_HIDCapabilities.FeatureReportByteLength];
+ BYTE *data = new BYTE[m_HIDCapabilities.FeatureReportByteLength];
data[0] = 0x02;
data[1] = 0x04;
data[2] = 0x00;
@@ -962,7 +962,7 @@ void CLCDConnectionLogitech::SetLCDBacklight(ELCDBrightness eBrightness) m_pConnectedDevice->GetIndex() != LGLCD_DEVICE_BW) //m_lcdDeviceDesc.deviceFamilyId != LGLCD_DEVICE_FAMILY_KEYBOARD_G15)
return;
- byte *data = new byte[m_HIDCapabilities.FeatureReportByteLength];
+ BYTE *data = new BYTE[m_HIDCapabilities.FeatureReportByteLength];
data[0] = 0x02;
data[1] = 0x02;
@@ -980,7 +980,7 @@ void CLCDConnectionLogitech::SetKBDBacklight(EKBDBrightness eBrightness) m_pConnectedDevice->GetIndex() != LGLCD_DEVICE_BW) //m_lcdDeviceDesc.deviceFamilyId != LGLCD_DEVICE_FAMILY_KEYBOARD_G15)
return;
- byte *data = new byte[m_HIDCapabilities.FeatureReportByteLength];
+ BYTE *data = new BYTE[m_HIDCapabilities.FeatureReportByteLength];
data[0] = 0x02;
data[1] = 0x01;
diff --git a/plugins/WinterSpeak/src/DialogConfigEngine.cpp b/plugins/WinterSpeak/src/DialogConfigEngine.cpp index dc6834fe13..8041453eb7 100644 --- a/plugins/WinterSpeak/src/DialogConfigEngine.cpp +++ b/plugins/WinterSpeak/src/DialogConfigEngine.cpp @@ -144,7 +144,7 @@ void DialogConfigEngine::save(HWND window) void DialogConfigEngine::updateVoices(HWND window)
{
SpeechInterface si;
- m_test_tts = std::auto_ptr<TextToSpeech>(si.createTts(getEngine(window)));
+ m_test_tts = std::unique_ptr<TextToSpeech>(si.createTts(getEngine(window)));
if (!m_test_tts.get())
{
@@ -215,12 +215,9 @@ bool DialogConfigEngine::createTts(HWND window) getVoiceDesc(window, desc);
SpeechInterface si;
- m_test_tts = std::auto_ptr<TextToSpeech>(si.createTts(desc.engine));
-
+ m_test_tts = std::unique_ptr<TextToSpeech>(si.createTts(desc.engine));
if (!m_test_tts.get())
- {
return false;
- }
si.configureTts(m_test_tts.get(), desc);
return true;
diff --git a/plugins/WinterSpeak/src/DialogConfigEngine.h b/plugins/WinterSpeak/src/DialogConfigEngine.h index 5d585bf6cf..7014bc6106 100644 --- a/plugins/WinterSpeak/src/DialogConfigEngine.h +++ b/plugins/WinterSpeak/src/DialogConfigEngine.h @@ -37,5 +37,5 @@ private: static DialogConfigEngine* m_instance;
ConfigDatabase& m_db;
- std::auto_ptr<TextToSpeech> m_test_tts;
+ std::unique_ptr<TextToSpeech> m_test_tts;
};
diff --git a/plugins/WinterSpeak/src/SpeakConfig.cpp b/plugins/WinterSpeak/src/SpeakConfig.cpp index 1d0d4185d7..c9bc28f878 100644 --- a/plugins/WinterSpeak/src/SpeakConfig.cpp +++ b/plugins/WinterSpeak/src/SpeakConfig.cpp @@ -7,7 +7,7 @@ SpeakConfig::SpeakConfig(HINSTANCE instance) : m_instance(instance), m_db(), m_t // create and configure the tts
SpeechInterface si;
VoiceDesc desc = m_db.getVoiceDesc();
- m_tts = std::auto_ptr<TextToSpeech>(si.createTts(desc.engine));
+ m_tts = std::unique_ptr<TextToSpeech>(si.createTts(desc.engine));
si.configureTts(m_tts.get(), desc);
// observer the database for changes
@@ -28,7 +28,7 @@ void SpeakConfig::update(Subject &subject) SpeechInterface si;
VoiceDesc desc = db.getVoiceDesc();
- m_tts = std::auto_ptr<TextToSpeech>(si.createTts(desc.engine));
+ m_tts = std::unique_ptr<TextToSpeech>(si.createTts(desc.engine));
si.configureTts(m_tts.get(), desc);
}
diff --git a/plugins/WinterSpeak/src/SpeakConfig.h b/plugins/WinterSpeak/src/SpeakConfig.h index 64fdaeb64a..bc453e8baa 100644 --- a/plugins/WinterSpeak/src/SpeakConfig.h +++ b/plugins/WinterSpeak/src/SpeakConfig.h @@ -35,7 +35,7 @@ private: HINSTANCE m_instance;
ConfigDatabase m_db;
- std::auto_ptr<TextToSpeech> m_tts;
+ std::unique_ptr<TextToSpeech> m_tts;
DialogConfigEngine m_dialog_engine;
DialogConfigActive m_dialog_active;
};
\ No newline at end of file |