From 1dddc938c7558ef77930f9d5d8fa75891d0b1f26 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 Feb 2013 09:29:45 +0000 Subject: added precompiled header git-svn-id: http://svn.miranda-ng.org/main/trunk@3700 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Boltun/Boltun_11.vcxproj | 39 ++++++++++++++++++------ plugins/Boltun/Boltun_11.vcxproj.filters | 3 ++ plugins/Boltun/src/Engine/CriticalSection.h | 2 -- plugins/Boltun/src/Engine/Mind.cpp | 10 +----- plugins/Boltun/src/Engine/Mind.h | 2 -- plugins/Boltun/src/Engine/MyCodeCvt.cpp | 2 +- plugins/Boltun/src/Engine/MyCodeCvt.h | 4 --- plugins/Boltun/src/Engine/PerContactData.h | 4 --- plugins/Boltun/src/Engine/TalkEngine.cpp | 4 +-- plugins/Boltun/src/Engine/UnrecentChooser.cpp | 18 +++++------ plugins/Boltun/src/Engine/UnrecentChooser.h | 5 +-- plugins/Boltun/src/Engine/ValueChooser.h | 3 -- plugins/Boltun/src/Engine/WordsList.cpp | 2 +- plugins/Boltun/src/Engine/WordsList.h | 4 --- plugins/Boltun/src/actionQueue.h | 2 -- plugins/Boltun/src/boltun.cpp | 23 -------------- plugins/Boltun/src/boltun.h | 44 +++++++++++++++++++++------ plugins/Boltun/src/config.h | 2 -- plugins/Boltun/src/stdafx.cpp | 18 +++++++++++ 19 files changed, 99 insertions(+), 92 deletions(-) create mode 100644 plugins/Boltun/src/stdafx.cpp (limited to 'plugins/Boltun') diff --git a/plugins/Boltun/Boltun_11.vcxproj b/plugins/Boltun/Boltun_11.vcxproj index b73c80dd27..e932ab9b52 100644 --- a/plugins/Boltun/Boltun_11.vcxproj +++ b/plugins/Boltun/Boltun_11.vcxproj @@ -79,10 +79,12 @@ OnlyExplicitInline Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;BOLTUN_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 + Use + boltun.h NDEBUG;%(PreprocessorDefinitions) @@ -104,10 +106,12 @@ OnlyExplicitInline Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;BOLTUN_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 + Use + boltun.h NDEBUG;%(PreprocessorDefinitions) @@ -127,12 +131,14 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;BOLTUN_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 EditAndContinue + Use + boltun.h _DEBUG;%(PreprocessorDefinitions) @@ -150,11 +156,13 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;BOLTUN_EXPORTS;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Level3 ProgramDatabase + Use + boltun.h _DEBUG;%(PreprocessorDefinitions) @@ -171,11 +179,24 @@ - - - - - + + ..\boltun.h + + + ..\boltun.h + + + ..\boltun.h + + + ..\boltun.h + + + ..\boltun.h + + + Create + diff --git a/plugins/Boltun/Boltun_11.vcxproj.filters b/plugins/Boltun/Boltun_11.vcxproj.filters index b7d0de0d5f..d91006fd75 100644 --- a/plugins/Boltun/Boltun_11.vcxproj.filters +++ b/plugins/Boltun/Boltun_11.vcxproj.filters @@ -45,6 +45,9 @@ Source Files\Enigne + + Source Files + diff --git a/plugins/Boltun/src/Engine/CriticalSection.h b/plugins/Boltun/src/Engine/CriticalSection.h index 59bc91beb9..550aa32696 100644 --- a/plugins/Boltun/src/Engine/CriticalSection.h +++ b/plugins/Boltun/src/Engine/CriticalSection.h @@ -21,8 +21,6 @@ #ifndef CriticalSectionH #define CriticalSectionH -#include - class CriticalSection { CRITICAL_SECTION csQueue; diff --git a/plugins/Boltun/src/Engine/Mind.cpp b/plugins/Boltun/src/Engine/Mind.cpp index fc4520de55..6f558e002b 100644 --- a/plugins/Boltun/src/Engine/Mind.cpp +++ b/plugins/Boltun/src/Engine/Mind.cpp @@ -18,15 +18,7 @@ // //*********************************************************** -#include "Mind.h" -#include -#include -#include "tstring.h" -#include "assert.h" - -#include - -#include "MyCodeCvt.h" +#include "..\boltun.h" using namespace std; diff --git a/plugins/Boltun/src/Engine/Mind.h b/plugins/Boltun/src/Engine/Mind.h index 23e0a41bd3..cdee200002 100644 --- a/plugins/Boltun/src/Engine/Mind.h +++ b/plugins/Boltun/src/Engine/Mind.h @@ -21,12 +21,10 @@ #ifndef MindH #define MindH -#include #include #include #include #include "WordsList.h" -#include #include "tstring.h" diff --git a/plugins/Boltun/src/Engine/MyCodeCvt.cpp b/plugins/Boltun/src/Engine/MyCodeCvt.cpp index 5d7baf4d88..e34575f811 100644 --- a/plugins/Boltun/src/Engine/MyCodeCvt.cpp +++ b/plugins/Boltun/src/Engine/MyCodeCvt.cpp @@ -18,7 +18,7 @@ // //*********************************************************** -#include "MyCodeCvt.h" +#include "..\boltun.h" using namespace std; diff --git a/plugins/Boltun/src/Engine/MyCodeCvt.h b/plugins/Boltun/src/Engine/MyCodeCvt.h index b4508c66de..40ca093795 100644 --- a/plugins/Boltun/src/Engine/MyCodeCvt.h +++ b/plugins/Boltun/src/Engine/MyCodeCvt.h @@ -21,10 +21,6 @@ #ifndef MYCODECVT_H #define MYCODECVT_H -#include -#include -#include - typedef std::codecvt MyCodeCvtBase; class MyCodeCvt diff --git a/plugins/Boltun/src/Engine/PerContactData.h b/plugins/Boltun/src/Engine/PerContactData.h index 14b17784b9..d130a03838 100644 --- a/plugins/Boltun/src/Engine/PerContactData.h +++ b/plugins/Boltun/src/Engine/PerContactData.h @@ -21,10 +21,6 @@ #ifndef PerContactDataH #define PerContactDataH -#include -#include -#include - #include "CriticalSection.h" static std::map perContactDataObjects; diff --git a/plugins/Boltun/src/Engine/TalkEngine.cpp b/plugins/Boltun/src/Engine/TalkEngine.cpp index 550aac66cf..0c711ab652 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.cpp +++ b/plugins/Boltun/src/Engine/TalkEngine.cpp @@ -18,9 +18,7 @@ // //*********************************************************** -#include "TalkEngine.h" -#include -#include +#include "..\boltun.h" #ifdef _DEBUG diff --git a/plugins/Boltun/src/Engine/UnrecentChooser.cpp b/plugins/Boltun/src/Engine/UnrecentChooser.cpp index b2e5303f5a..d11806503b 100644 --- a/plugins/Boltun/src/Engine/UnrecentChooser.cpp +++ b/plugins/Boltun/src/Engine/UnrecentChooser.cpp @@ -18,12 +18,12 @@ // //*********************************************************** -#include "UnrecentChooser.h" +#include "..\boltun.h" using namespace std; UnRecentChooser::UnRecentChooser() - :last(-1), min(-1), newItemsPrio(-1), maxOldPrio(-1) + :last(-1), minimum(-1), newItemsPrio(-1), maxOldPrio(-1) { } @@ -34,8 +34,8 @@ void UnRecentChooser::AddChoice(tstring value, float prio) int val = (int)items[value]; oldItems.insert(make_pair(val, value)); oldPrios.insert(make_pair(value, prio)); - if (min > val || min == -1) - min = val; + if (minimum > val || minimum == -1) + minimum = val; if (maxOldPrio < prio) maxOldPrio = prio; } @@ -59,17 +59,17 @@ tstring UnRecentChooser::Choose() res = newItems[num]; } else - if (min == -1) + if (minimum == -1) res = _T(""); else { float minprio = maxOldPrio / 1.5F; - while (oldPrios[oldItems[min]] < minprio) - min++; - res = oldItems[min]; + while (oldPrios[oldItems[minimum]] < minprio) + minimum++; + res = oldItems[minimum]; } //Clean items - min = -1; + minimum = -1; newItemsPrio = -1; maxOldPrio = -1; oldItems.clear(); diff --git a/plugins/Boltun/src/Engine/UnrecentChooser.h b/plugins/Boltun/src/Engine/UnrecentChooser.h index 91a961e307..e815a6ec96 100644 --- a/plugins/Boltun/src/Engine/UnrecentChooser.h +++ b/plugins/Boltun/src/Engine/UnrecentChooser.h @@ -21,9 +21,6 @@ #ifndef UnRecentChooserH #define UnRecentChooserH -#include -#include -#include #include "tstring.h" class UnRecentChooser @@ -35,7 +32,7 @@ class UnRecentChooser std::map oldItems; std::map oldPrios; size_t last; - int min; + int minimum; static const size_t maxItems = 100; public: UnRecentChooser(); diff --git a/plugins/Boltun/src/Engine/ValueChooser.h b/plugins/Boltun/src/Engine/ValueChooser.h index 219a55a8f2..8a3add430a 100644 --- a/plugins/Boltun/src/Engine/ValueChooser.h +++ b/plugins/Boltun/src/Engine/ValueChooser.h @@ -21,9 +21,6 @@ #ifndef StringChooserH #define StringChooserH -#include -#include - template > class ValueChooser { diff --git a/plugins/Boltun/src/Engine/WordsList.cpp b/plugins/Boltun/src/Engine/WordsList.cpp index 3209bf2db6..08cd150aaf 100644 --- a/plugins/Boltun/src/Engine/WordsList.cpp +++ b/plugins/Boltun/src/Engine/WordsList.cpp @@ -18,7 +18,7 @@ // //*********************************************************** -#include "WordsList.h" +#include "..\boltun.h" using namespace std; diff --git a/plugins/Boltun/src/Engine/WordsList.h b/plugins/Boltun/src/Engine/WordsList.h index bd74b2007b..b6e0792101 100644 --- a/plugins/Boltun/src/Engine/WordsList.h +++ b/plugins/Boltun/src/Engine/WordsList.h @@ -21,10 +21,6 @@ #ifndef WordsListH #define WordsListH -#include -#include -#include -#include "tchar.h" #include "tstring.h" class WordsList diff --git a/plugins/Boltun/src/actionQueue.h b/plugins/Boltun/src/actionQueue.h index 78f6ce5f9e..780bbde97a 100644 --- a/plugins/Boltun/src/actionQueue.h +++ b/plugins/Boltun/src/actionQueue.h @@ -21,8 +21,6 @@ #ifndef ACTIONQUEUE_H #define ACTIONQUEUE_H -#include - void AnswerToContact(HANDLE hContact, const TCHAR* messageToAnswer); void StartChatting(HANDLE hContact); diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 81362c33c8..99eb76ef2b 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -18,30 +18,7 @@ // //*********************************************************** -#include "Engine/TalkEngine.h" - -#include -#include -#include - -#include "newpluginapi.h" -#include "m_clist.h" -#include "m_skin.h" -#include "m_database.h" -#include "m_system.h" -#include "m_protosvc.h" -#include "m_options.h" -#include "m_langpack.h" -#include "resource.h" - -#include "resource.h" -#include "version.h" - #include "boltun.h" -#include "config.h" -#include "actionQueue.h" - -//#define DEBUG_LOAD_TIME int hLangpack; diff --git a/plugins/Boltun/src/boltun.h b/plugins/Boltun/src/boltun.h index c6782e8f6b..6dc05b9f88 100644 --- a/plugins/Boltun/src/boltun.h +++ b/plugins/Boltun/src/boltun.h @@ -21,11 +21,35 @@ #ifndef _BOLTUN_H #define _BOLTUN_H -//Should use different keys in UNICODE and ANSI builds, because usage of plugin -//with old (another) configs will cause crashes. +#define _CRT_SECURE_NO_WARNINGS -#define BOLTUN_KEY "Boltun" +#include +#include +#include +#include +#include "assert.h" + +#include "newpluginapi.h" +#include "m_clist.h" +#include "m_skin.h" +#include "m_database.h" +#include "m_system.h" +#include "m_protosvc.h" +#include "m_options.h" +#include "m_langpack.h" + +#include "resource.h" +#include "version.h" +#include "config.h" +#include "actionQueue.h" +#include "Engine/TalkEngine.h" +#include "Engine/WordsList.h" +#include "Engine/UnrecentChooser.h" +#include "Engine/MyCodeCvt.h" +#include "Engine/Mind.h" +#include "Engine/tstring.h" +#define BOLTUN_KEY "Boltun" //Service names #define SERV_CONTACT_AUTO_CHAT "Boltun/ContactAutoChat" @@ -35,13 +59,13 @@ //Database keys #define DB_CONTACT_BOLTUN_NOT_TO_CHAT "BoltunNotToChat" #define DB_CONTACT_BOLTUN_AUTO_CHAT "BoltunAutoChat" -#define DB_CONTACT_WARNED "Warned" - -//Plugin group in settings -#define BOLTUN_GROUP LPGEN("Message sessions") - -//Filename depends on UNICODE -#define DEFAULT_MIND_FILE _T("boltun.mindw") +#define DB_CONTACT_WARNED "Warned" + +//Plugin group in settings +#define BOLTUN_GROUP LPGEN("Message sessions") + +//Filename depends on UNICODE +#define DEFAULT_MIND_FILE _T("boltun.mindw") //=============================================== // These are strings for translation: diff --git a/plugins/Boltun/src/config.h b/plugins/Boltun/src/config.h index c5bb20e700..a51240ad70 100644 --- a/plugins/Boltun/src/config.h +++ b/plugins/Boltun/src/config.h @@ -21,8 +21,6 @@ #ifndef _CONFIG_H #define _CONFIG_H -#include - class BoltunConfig; template diff --git a/plugins/Boltun/src/stdafx.cpp b/plugins/Boltun/src/stdafx.cpp new file mode 100644 index 0000000000..acd7a27bd5 --- /dev/null +++ b/plugins/Boltun/src/stdafx.cpp @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "boltun.h" \ No newline at end of file -- cgit v1.2.3