summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-02-23 09:29:45 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-02-23 09:29:45 +0000
commit1dddc938c7558ef77930f9d5d8fa75891d0b1f26 (patch)
treeb2ca5584dfb26c38914ae561a01f6e34163582e7 /plugins
parente47ee115a0e6f00baa9c7153c47b9f1435c9f229 (diff)
added precompiled header
git-svn-id: http://svn.miranda-ng.org/main/trunk@3700 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Boltun/Boltun_11.vcxproj39
-rw-r--r--plugins/Boltun/Boltun_11.vcxproj.filters3
-rw-r--r--plugins/Boltun/src/Engine/CriticalSection.h2
-rw-r--r--plugins/Boltun/src/Engine/Mind.cpp10
-rw-r--r--plugins/Boltun/src/Engine/Mind.h2
-rw-r--r--plugins/Boltun/src/Engine/MyCodeCvt.cpp2
-rw-r--r--plugins/Boltun/src/Engine/MyCodeCvt.h4
-rw-r--r--plugins/Boltun/src/Engine/PerContactData.h4
-rw-r--r--plugins/Boltun/src/Engine/TalkEngine.cpp4
-rw-r--r--plugins/Boltun/src/Engine/UnrecentChooser.cpp18
-rw-r--r--plugins/Boltun/src/Engine/UnrecentChooser.h5
-rw-r--r--plugins/Boltun/src/Engine/ValueChooser.h3
-rw-r--r--plugins/Boltun/src/Engine/WordsList.cpp2
-rw-r--r--plugins/Boltun/src/Engine/WordsList.h4
-rw-r--r--plugins/Boltun/src/actionQueue.h2
-rw-r--r--plugins/Boltun/src/boltun.cpp23
-rw-r--r--plugins/Boltun/src/boltun.h44
-rw-r--r--plugins/Boltun/src/config.h2
-rw-r--r--plugins/Boltun/src/stdafx.cpp18
19 files changed, 99 insertions, 92 deletions
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 @@
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BOLTUN_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>boltun.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -104,10 +106,12 @@
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;BOLTUN_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>boltun.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -127,12 +131,14 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BOLTUN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>boltun.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -150,11 +156,13 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;BOLTUN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>boltun.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -171,11 +179,24 @@
<ClCompile Include="src\actionQueue.cpp" />
<ClCompile Include="src\boltun.cpp" />
<ClCompile Include="src\config.cpp" />
- <ClCompile Include="src\Engine\Mind.cpp" />
- <ClCompile Include="src\Engine\MyCodeCvt.cpp" />
- <ClCompile Include="src\Engine\TalkEngine.cpp" />
- <ClCompile Include="src\Engine\UnrecentChooser.cpp" />
- <ClCompile Include="src\Engine\WordsList.cpp" />
+ <ClCompile Include="src\Engine\Mind.cpp">
+ <PrecompiledHeaderFile>..\boltun.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="src\Engine\MyCodeCvt.cpp">
+ <PrecompiledHeaderFile>..\boltun.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="src\Engine\TalkEngine.cpp">
+ <PrecompiledHeaderFile>..\boltun.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="src\Engine\UnrecentChooser.cpp">
+ <PrecompiledHeaderFile>..\boltun.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="src\Engine\WordsList.cpp">
+ <PrecompiledHeaderFile>..\boltun.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\actionQueue.h" />
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 @@
<ClCompile Include="src\Engine\WordsList.cpp">
<Filter>Source Files\Enigne</Filter>
</ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\actionQueue.h">
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 <windows.h>
-
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 <fstream>
-#include <algorithm>
-#include "tstring.h"
-#include "assert.h"
-
-#include <windows.h>
-
-#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 <string>
#include <vector>
#include <map>
#include <set>
#include "WordsList.h"
-#include <tchar.h>
#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 <locale>
-#include <xlocale>
-#include <cwchar>
-
typedef std::codecvt<wchar_t, char, std::mbstate_t> 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 <map>
-#include <time.h>
-#include <assert.h>
-
#include "CriticalSection.h"
static std::map<unsigned, void*> 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 <fstream>
-#include <windows.h>
+#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 <map>
-#include <vector>
-#include <string>
#include "tstring.h"
class UnRecentChooser
@@ -35,7 +32,7 @@ class UnRecentChooser
std::map<size_t, tstring> oldItems;
std::map<tstring, float> 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 <vector>
-#include <string>
-
template<class container = std::vector<tstring> >
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 <set>
-#include <vector>
-#include <string>
-#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 <windows.h>
-
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 <windows.h>
-#include <time.h>
-#include <string>
-
-#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 <windows.h>
+#include <time.h>
+#include <fstream>
+#include <algorithm>
+#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 <tchar.h>
-
class BoltunConfig;
template <class T, class BaseClass>
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 <http://www.gnu.org/licenses/>.
+*/
+
+#include "boltun.h" \ No newline at end of file