mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #5836
5836: Fix Clang 15 warnings (fixes #5548) r=Learath2 a=def- <!-- What is the motivation for the changes of this pull request --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Dennis Felsing <dennis@felsin9.de>
This commit is contained in:
commit
c65b468249
|
@ -6,7 +6,7 @@
|
|||
class SCOPED_CAPABILITY CLockScope
|
||||
{
|
||||
public:
|
||||
CLockScope(LOCK Lock) ACQUIRE(Lock, m_Lock) REQUIRES(!Lock, !m_Lock) :
|
||||
CLockScope(LOCK Lock) ACQUIRE(Lock, m_Lock) :
|
||||
m_Lock(Lock)
|
||||
{
|
||||
lock_wait(m_Lock);
|
||||
|
|
|
@ -6,25 +6,25 @@
|
|||
#include <engine/storage.h>
|
||||
#include <game/mapitems.h>
|
||||
|
||||
bool CreatePixelArt(const char[][64], const int[], const int[], int[], const bool[]);
|
||||
bool CreatePixelArt(const char[3][64], const int[2], const int[2], int[2], const bool[2]);
|
||||
void InsertCurrentQuads(CDataFileReader &, CMapItemLayerQuads *, CQuad *);
|
||||
int InsertPixelArtQuads(CQuad *, int &, const CImageInfo &, const int[], const int[], const bool[]);
|
||||
int InsertPixelArtQuads(CQuad *, int &, const CImageInfo &, const int[2], const int[2], const bool[2]);
|
||||
|
||||
bool LoadPNG(CImageInfo *, const char *);
|
||||
bool OpenMaps(const char[][64], CDataFileReader &, CDataFileWriter &);
|
||||
bool OpenMaps(const char[2][64], CDataFileReader &, CDataFileWriter &);
|
||||
void SaveOutputMap(CDataFileReader &, CDataFileWriter &, CMapItemLayerQuads *, int, CQuad *, int);
|
||||
|
||||
CMapItemLayerQuads *GetQuadLayer(CDataFileReader &, const int[], int *);
|
||||
CQuad CreateNewQuad(float, float, int, int, const uint8_t[], const int[]);
|
||||
CMapItemLayerQuads *GetQuadLayer(CDataFileReader &, const int[2], int *);
|
||||
CQuad CreateNewQuad(float, float, int, int, const uint8_t[4], const int[2]);
|
||||
|
||||
bool GetPixelClamped(const CImageInfo &, int, int, uint8_t[]);
|
||||
bool ComparePixel(const uint8_t[], const uint8_t[]);
|
||||
bool IsPixelOptimizable(const CImageInfo &, int, int, const uint8_t[], const bool[]);
|
||||
bool GetPixelClamped(const CImageInfo &, int, int, uint8_t[4]);
|
||||
bool ComparePixel(const uint8_t[4], const uint8_t[4]);
|
||||
bool IsPixelOptimizable(const CImageInfo &, int, int, const uint8_t[4], const bool[]);
|
||||
void SetVisitedPixels(const CImageInfo &, int, int, int, int, bool[]);
|
||||
|
||||
int GetImagePixelSize(const CImageInfo &);
|
||||
int FindSuperPixelSize(const CImageInfo &, const uint8_t[], int, int, int, bool[]);
|
||||
void GetOptimizedQuadSize(const CImageInfo &, int, const uint8_t[], int, int, int &, int &, bool[]);
|
||||
int FindSuperPixelSize(const CImageInfo &, const uint8_t[4], int, int, int, bool[]);
|
||||
void GetOptimizedQuadSize(const CImageInfo &, int, const uint8_t[4], int, int, int &, int &, bool[]);
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
{
|
||||
|
|
|
@ -23,36 +23,36 @@ struct MapObject // quad pivot or tile layer
|
|||
float m_aaExtendedArea[2][2]; // extended with parallax
|
||||
};
|
||||
|
||||
bool ReplaceArea(IStorage *, const char[][64], const float[][2][2]);
|
||||
bool OpenMaps(IStorage *, const char[][64], CDataFileReader[], CDataFileWriter &);
|
||||
bool ReplaceArea(IStorage *, const char[3][64], const float[][2][2]);
|
||||
bool OpenMaps(IStorage *, const char[3][64], CDataFileReader[2], CDataFileWriter &);
|
||||
void SaveOutputMap(CDataFileReader &, CDataFileWriter &);
|
||||
bool CompareLayers(const char[][64], CDataFileReader[]);
|
||||
void CompareGroups(const char[][64], CDataFileReader[]);
|
||||
bool CompareLayers(const char[3][64], CDataFileReader[2]);
|
||||
void CompareGroups(const char[3][64], CDataFileReader[2]);
|
||||
const CMapItemGroup *GetLayerGroup(CDataFileReader &, int);
|
||||
|
||||
void ReplaceAreaTiles(CDataFileReader[], const float[][2][2], const CMapItemGroup *[], CMapItemLayer *[]);
|
||||
void RemoveDestinationTiles(CMapItemLayerTilemap *, CTile *, float[][2]);
|
||||
void ReplaceDestinationTiles(CMapItemLayerTilemap *[], CTile *[], float[][2][2]);
|
||||
bool AdaptVisibleAreas(const float[][2][2], const MapObject[], float[][2][2]);
|
||||
bool AdaptReplaceableAreas(const float[][2][2], const float[][2][2], const MapObject[], float[][2][2]);
|
||||
void ReplaceAreaTiles(CDataFileReader[2], const float[][2][2], const CMapItemGroup *[2], CMapItemLayer *[2]);
|
||||
void RemoveDestinationTiles(CMapItemLayerTilemap *, CTile *, float[2][2]);
|
||||
void ReplaceDestinationTiles(CMapItemLayerTilemap *[2], CTile *[2], float[2][2][2]);
|
||||
bool AdaptVisibleAreas(const float[2][2][2], const MapObject[2], float[2][2][2]);
|
||||
bool AdaptReplaceableAreas(const float[2][2][2], const float[2][2][2], const MapObject[2], float[2][2][2]);
|
||||
|
||||
void ReplaceAreaQuads(CDataFileReader[], const float[][2][2], const CMapItemGroup *[], CMapItemLayer *[], int);
|
||||
bool RemoveDestinationQuads(const float[][2], const CQuad *, int, const CMapItemGroup *, CQuad *, int &);
|
||||
bool InsertDestinationQuads(const float[][2][2], const CQuad *, int, const CMapItemGroup *[], CQuad *, int &);
|
||||
bool AdaptVisiblePoint(const float[][2][2], const float[][2], const MapObject[], float[]);
|
||||
void ReplaceAreaQuads(CDataFileReader[2], const float[][2][2], const CMapItemGroup *[2], CMapItemLayer *[2], int);
|
||||
bool RemoveDestinationQuads(const float[2][2], const CQuad *, int, const CMapItemGroup *, CQuad *, int &);
|
||||
bool InsertDestinationQuads(const float[2][2][2], const CQuad *, int, const CMapItemGroup *[2], CQuad *, int &);
|
||||
bool AdaptVisiblePoint(const float[2][2][2], const float[2][2], const MapObject[2], float[2]);
|
||||
|
||||
MapObject CreateMapObject(const CMapItemGroup *, int, int, int, int);
|
||||
void SetExtendedArea(MapObject &);
|
||||
bool GetVisibleArea(const float[][2], MapObject, float[][2] = 0x0);
|
||||
bool GetReplaceableArea(const float[][2], MapObject, float[][2]);
|
||||
bool GetVisibleArea(const float[2][2], MapObject, float[2][2] = 0x0);
|
||||
bool GetReplaceableArea(const float[2][2], MapObject, float[2][2]);
|
||||
|
||||
void GetGameAreaDistance(const float[][2][2], const MapObject[], const float[][2][2], float[]);
|
||||
void GetGameAreaDistance(const float[][2][2], const MapObject[], const float[][2], float[]);
|
||||
void GetSignificantScreenPos(MapObject, const float[][2], const float[][2], float[]);
|
||||
void ConvertToTiles(const float[][2], int[][2]);
|
||||
void GetGameAreaDistance(const float[2][2][2], const MapObject[2], const float[2][2][2], float[2]);
|
||||
void GetGameAreaDistance(const float[2][2][2], const MapObject[2], const float[2][2], float[2]);
|
||||
void GetSignificantScreenPos(MapObject, const float[2][2], const float[2][2], float[2]);
|
||||
void ConvertToTiles(const float[2][2], int[2][2]);
|
||||
|
||||
bool GetLineIntersection(const float[], const float[], float[] = 0x0);
|
||||
bool GetLineIntersection(const float[], float);
|
||||
bool GetLineIntersection(const float[2], const float[2], float[2] = 0x0);
|
||||
bool GetLineIntersection(const float[2], float);
|
||||
void SetInexistent(float *, int);
|
||||
bool IsInexistent(const float *, int);
|
||||
bool IsInexistent(float);
|
||||
|
|
Loading…
Reference in a new issue