Skip to content

Commit a2caee6

Browse files
authored
Rename CDataFileReader::MapSize/IEngineMap::MapSize to Size (ddnet#11644)
2 parents 24579a6 + b1c09b8 commit a2caee6

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

src/engine/client/client.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4068,7 +4068,7 @@ void CClient::DemoRecorder_Start(const char *pFilename, bool WithTimestamp, int
40684068
m_pMap->Sha256(),
40694069
m_pMap->Crc(),
40704070
"client",
4071-
m_pMap->MapSize(),
4071+
m_pMap->Size(),
40724072
nullptr,
40734073
m_pMap->File(),
40744074
nullptr,
@@ -5080,7 +5080,7 @@ void CClient::RaceRecord_Start(const char *pFilename)
50805080
m_pMap->Sha256(),
50815081
m_pMap->Crc(),
50825082
"client",
5083-
m_pMap->MapSize(),
5083+
m_pMap->Size(),
50845084
nullptr,
50855085
m_pMap->File(),
50865086
nullptr,

src/engine/map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class IEngineMap : public IMap
4343

4444
virtual SHA256_DIGEST Sha256() const = 0;
4545
virtual unsigned Crc() const = 0;
46-
virtual int MapSize() const = 0;
46+
virtual int Size() const = 0;
4747
};
4848

4949
extern IEngineMap *CreateEngineMap();

src/engine/shared/datafile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ unsigned CDataFileReader::Crc() const
908908
return m_pDataFile->m_Crc;
909909
}
910910

911-
int CDataFileReader::MapSize() const
911+
int CDataFileReader::Size() const
912912
{
913913
dbg_assert(m_pDataFile != nullptr, "File not open");
914914

src/engine/shared/datafile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CDataFileReader
5353

5454
SHA256_DIGEST Sha256() const;
5555
unsigned Crc() const;
56-
int MapSize() const;
56+
int Size() const;
5757
};
5858

5959
// write access

src/engine/shared/map.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ unsigned CMap::Crc() const
155155
return m_DataFile.Crc();
156156
}
157157

158-
int CMap::MapSize() const
158+
int CMap::Size() const
159159
{
160-
return m_DataFile.MapSize();
160+
return m_DataFile.Size();
161161
}
162162

163163
void CMap::ExtractTiles(CTile *pDest, size_t DestSize, const CTile *pSrc, size_t SrcSize)

src/engine/shared/map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CMap : public IEngineMap
3939

4040
SHA256_DIGEST Sha256() const override;
4141
unsigned Crc() const override;
42-
int MapSize() const override;
42+
int Size() const override;
4343

4444
static void ExtractTiles(class CTile *pDest, size_t DestSize, const class CTile *pSrc, size_t SrcSize);
4545
};

src/game/client/gameclient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4565,7 +4565,7 @@ void CGameClient::LoadMapSettings()
45654565
{
45664566
IEngineMap *pMap = Kernel()->RequestInterface<IEngineMap>();
45674567

4568-
m_MapBugs = CMapBugs::Create(Client()->GetCurrentMap(), pMap->MapSize(), pMap->Sha256());
4568+
m_MapBugs = CMapBugs::Create(Client()->GetCurrentMap(), pMap->Size(), pMap->Sha256());
45694569

45704570
// Reset Tunezones
45714571
for(int TuneZone = 0; TuneZone < TuneZone::NUM; TuneZone++)

src/tools/map_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static int TestMap(const char *pMap, bool CalcHashes, IStorage *pStorage)
2020

2121
char aSha256Str[SHA256_MAXSTRSIZE];
2222
sha256_str(Reader.Sha256(), aSha256Str, sizeof(aSha256Str));
23-
log_info(TOOL_NAME, "File size: %d", Reader.MapSize());
23+
log_info(TOOL_NAME, "File size: %d", Reader.Size());
2424
log_info(TOOL_NAME, "File SHA256: %s", aSha256Str);
2525
log_info(TOOL_NAME, "File CRC32: %08x", Reader.Crc());
2626
log_info(TOOL_NAME, "Num items: %d", Reader.NumItems());

0 commit comments

Comments
 (0)