45
45
#include "ICvDLLUserInterface.h"
46
46
#include "CvEnumSerialization.h"
47
47
#include "FStlContainerSerialization.h"
48
- #include "FAutoVariableBase.h"
49
48
#include "CvStringUtils.h"
50
49
#include "CvBarbarians.h"
51
50
#include "CvGoodyHuts.h"
52
51
53
52
#include <sstream>
54
53
55
- #include "FTempHeap.h"
56
54
#include "CvDiplomacyRequests.h"
57
55
58
56
#include "CvDllPlot.h"
59
57
#include "FFileSystem.h"
60
-
61
58
#include "CvInfosSerializationHelper.h"
62
59
#include "CvCityManager.h"
63
60
#include "CvPlayerManager.h"
@@ -6102,7 +6099,7 @@ void CvGame::sendPlayerOptions(bool bForce)
6102
6099
CvPlayerOptionInfo* pkInfo = GC.getPlayerOptionInfo(eOption);
6103
6100
if (pkInfo)
6104
6101
{
6105
- uint uiID = FString::Hash ( pkInfo->GetType() );
6102
+ uint uiID = FStringHash ( pkInfo->GetType() );
6106
6103
gDLL->sendPlayerOption(static_cast<PlayerOptionTypes>(uiID), gDLL->getPlayerOption(static_cast<PlayerOptionTypes>(uiID)));
6107
6104
}
6108
6105
}
@@ -10427,7 +10424,7 @@ int CvGame::calculateOptionsChecksum()
10427
10424
CvPlayerOptionInfo* pkInfo = GC.getPlayerOptionInfo((PlayerOptionTypes)iJ);
10428
10425
if (pkInfo)
10429
10426
{
10430
- uint uiID = FString::Hash ( pkInfo->GetType() );
10427
+ uint uiID = FStringHash ( pkInfo->GetType() );
10431
10428
if(kPlayer.isOption((PlayerOptionTypes)uiID))
10432
10429
{
10433
10430
iValue += (iI * 943097);
@@ -11140,7 +11137,7 @@ void CvGame::readSaveGameDB(FDataStream& kStream)
11140
11137
FIFile* pkFile = FFILESYSTEM.Create(wstrDatabasePath.c_str(), FIFile::modeWrite);
11141
11138
if (pkFile != NULL)
11142
11139
{
11143
- byte* szBuffer = GetTempHeap()->Allocate( sizeof(char) * lSize) ;
11140
+ byte* szBuffer = new byte[ sizeof(char) * lSize] ;
11144
11141
ZeroMemory((void*)szBuffer, lSize);
11145
11142
11146
11143
kStream.ReadIt(lSize, szBuffer);
@@ -11149,7 +11146,7 @@ void CvGame::readSaveGameDB(FDataStream& kStream)
11149
11146
11150
11147
pkFile->Close();
11151
11148
11152
- GetTempHeap()->DeAllocate (szBuffer);
11149
+ free (szBuffer);
11153
11150
}
11154
11151
else
11155
11152
{
@@ -11174,7 +11171,7 @@ void CvGame::writeSaveGameDB(FDataStream& kStream) const
11174
11171
DWORD dwSize = GetFileSize(hFile, NULL);
11175
11172
if (dwSize != INVALID_FILE_SIZE)
11176
11173
{
11177
- byte* szBuffer = GetTempHeap()->Allocate( sizeof(char) * dwSize) ;
11174
+ byte* szBuffer = new byte[ sizeof(char) * dwSize] ;
11178
11175
ZeroMemory((void*)szBuffer, dwSize);
11179
11176
11180
11177
DWORD dwBytesRead = 0;
@@ -11185,7 +11182,7 @@ void CvGame::writeSaveGameDB(FDataStream& kStream) const
11185
11182
kStream.WriteIt(dwBytesRead, szBuffer);
11186
11183
}
11187
11184
11188
- GetTempHeap()->DeAllocate (szBuffer);
11185
+ free (szBuffer);
11189
11186
}
11190
11187
else
11191
11188
{
0 commit comments