mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
HPL1: remove std::string from MemoryManager
This commit is contained in:
parent
13a7b1379a
commit
125de63a68
@ -25,6 +25,8 @@
|
||||
* This file is part of HPL1 Engine.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "hpl1/engine/game/ScriptFuncs.h"
|
||||
|
||||
#include "hpl1/engine/game/Game.h"
|
||||
|
@ -43,7 +43,7 @@ int cMemoryManager::mlCreationCount = 0;
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
cAllocatedPointer::cAllocatedPointer(void *apData, const std::string &asFile, int alLine, size_t alMemory) {
|
||||
cAllocatedPointer::cAllocatedPointer(void *apData, const Common::String &asFile, int alLine, size_t alMemory) {
|
||||
mpData = apData;
|
||||
msFile = asFile;
|
||||
mlLine = alLine;
|
||||
@ -113,8 +113,8 @@ void cMemoryManager::LogResults() {
|
||||
tAllocatedPointerMapIt it = m_mapPointers.begin();
|
||||
for (; it != m_mapPointers.end(); ++it) {
|
||||
cAllocatedPointer &ap = it->second;
|
||||
if ((int)ap.msFile.length() > lMax)
|
||||
lMax = (int)ap.msFile.length();
|
||||
if ((int)ap.msFile.size() > lMax)
|
||||
lMax = (int)ap.msFile.size();
|
||||
}
|
||||
|
||||
lMax += 5;
|
||||
@ -130,7 +130,7 @@ void cMemoryManager::LogResults() {
|
||||
for (; it != m_mapPointers.end(); ++it) {
|
||||
cAllocatedPointer &ap = it->second;
|
||||
Log("| %d\t %s", ap.mpData, ap.msFile.c_str());
|
||||
for (int i = 0; i < lMax - (int)ap.msFile.length(); ++i)
|
||||
for (int i = 0; i < lMax - (int)ap.msFile.size(); ++i)
|
||||
Log(" ");
|
||||
Log("%d\t\t %d\t\n", ap.mlLine, ap.mlMemory);
|
||||
}
|
||||
|
@ -28,8 +28,8 @@
|
||||
#ifndef HPL_MEMORY_MANAGER_H
|
||||
#define HPL_MEMORY_MANAGER_H
|
||||
|
||||
#include <string>
|
||||
#include "hpl1/std/map.h"
|
||||
#include "common/str.h"
|
||||
|
||||
namespace hpl {
|
||||
|
||||
@ -37,9 +37,9 @@ namespace hpl {
|
||||
|
||||
class cAllocatedPointer {
|
||||
public:
|
||||
cAllocatedPointer(void *apData, const std::string &asFile, int alLine, size_t alMemory);
|
||||
cAllocatedPointer(void *apData, const Common::String &asFile, int alLine, size_t alMemory);
|
||||
|
||||
std::string msFile;
|
||||
Common::String msFile;
|
||||
int mlLine;
|
||||
size_t mlMemory;
|
||||
void *mpData;
|
||||
|
@ -25,6 +25,8 @@
|
||||
* This file is part of Penumbra Overture.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "hpl1/penumbra-overture/GameScripts.h"
|
||||
#include "hpl1/engine/engine.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user