Minor tweaks to keep ODR across translation units

This commit is contained in:
Jupeyy 2022-07-02 14:25:16 +02:00
parent e7c3f108ef
commit 50f8653c57
5 changed files with 8 additions and 21 deletions

View file

@ -1,19 +1,10 @@
#include <base/detect.h>
#if defined(CONF_FAMILY_WINDOWS)
// For FlashWindowEx, FLASHWINFO, FLASHW_TRAY
#define _WIN32_WINNT 0x0501
#define WINVER 0x0501
#endif
#ifndef CONF_BACKEND_OPENGL_ES
#include <GL/glew.h>
#endif
#include <SDL.h>
#include <SDL_hints.h>
#include <SDL_pixels.h>
#include <SDL_video.h>
#include <base/detect.h>
#include <base/math.h>
@ -51,12 +42,6 @@
class IStorage;
#ifdef __MINGW32__
extern "C" {
int putenv(const char *);
}
#endif
// ------------ CGraphicsBackend_Threaded
void CGraphicsBackend_Threaded::ThreadFunc(void *pUser)

View file

@ -39,11 +39,6 @@ struct CItemEx
}
};
static int GetTypeFromIndex(int Index)
{
return ITEMTYPE_EX - Index - 1;
}
struct CDatafileItemType
{
int m_Type;
@ -582,6 +577,11 @@ bool CDataFileWriter::Open(class IStorage *pStorage, const char *pFilename, int
return OpenFile(pStorage, pFilename, StorageType);
}
int CDataFileWriter::GetTypeFromIndex(int Index)
{
return ITEMTYPE_EX - Index - 1;
}
int CDataFileWriter::GetExtendedItemTypeIndex(int Type)
{
for(int i = 0; i < m_NumExtendedItemTypes; i++)

View file

@ -100,6 +100,7 @@ class CDataFileWriter
int m_aExtendedItemTypes[MAX_EXTENDED_ITEM_TYPES];
int GetExtendedItemTypeIndex(int Type);
int GetTypeFromIndex(int Index);
public:
CDataFileWriter();

View file

@ -584,7 +584,7 @@ int CSnapshotBuilder::Finish(void *pSnapData)
return sizeof(CSnapshot) + OffsetSize + m_DataSize;
}
static int GetTypeFromIndex(int Index)
int CSnapshotBuilder::GetTypeFromIndex(int Index)
{
return CSnapshot::MAX_TYPE - Index;
}

View file

@ -144,6 +144,7 @@ class CSnapshotBuilder
void AddExtendedItemType(int Index);
int GetExtendedItemTypeIndex(int TypeID);
int GetTypeFromIndex(int Index);
bool m_Sixup;