diff --git a/code/nel/src/misc/sheet_id.cpp b/code/nel/src/misc/sheet_id.cpp index 0ff90b1f8..9a9b8813f 100644 --- a/code/nel/src/misc/sheet_id.cpp +++ b/code/nel/src/misc/sheet_id.cpp @@ -157,7 +157,7 @@ bool CSheetId::buildSheetId(const std::string& sheetName) { _FileExtensions.push_back(sheetType); _DevSheetIdToName.push_back(std::vector()); - typeId = _FileExtensions.size() - 1; + typeId = (uint32)_FileExtensions.size() - 1; _DevTypeNameToId[sheetType] = typeId; std::string unknownNewType = std::string("unknown." + sheetType); _DevSheetIdToName[typeId].push_back(unknownNewType); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp index 9a3f4fe61..0c791aa7c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -381,7 +381,7 @@ bool MissionCompilerMainWindow::parsePrimForMissions(NLLIGO::IPrimitive const *p { std::string value; // if the node is a mission parse it - if (prim->getPropertyByName("class",value) && !NLMISC::stricmp(value.c_str(),"mission") ) + if (prim->getPropertyByName("class",value) && !NLMISC::nlstricmp(value.c_str(),"mission") ) { std::string name; prim->getPropertyByName("name",name); diff --git a/code/nel/tools/3d/tile_edit_qt/pic/PIC_System.c b/code/nel/tools/3d/tile_edit_qt/pic/PIC_System.c index 4e97fed78..498e5d302 100644 --- a/code/nel/tools/3d/tile_edit_qt/pic/PIC_System.c +++ b/code/nel/tools/3d/tile_edit_qt/pic/PIC_System.c @@ -8,8 +8,8 @@ #define PIC_ERRSIZE 256 -static unsigned long PIC_Sys_MEM_Allocated; -static unsigned long PIC_Sys_MEM_NbAllocs; +static size_t PIC_Sys_MEM_Allocated; +static size_t PIC_Sys_MEM_NbAllocs; #if defined(__APPLE__) #define _msize malloc_size @@ -31,7 +31,7 @@ void *Pic_malloc(unsigned long size) return(mem); } /* ----- */ -void *Pic_calloc(unsigned long count, unsigned long size) +void *Pic_calloc(size_t count, size_t size) { void *mem; mem=calloc(count,size); @@ -45,24 +45,24 @@ void *Pic_calloc(unsigned long count, unsigned long size) /* ----- */ void Pic_free(void *memblock) { - unsigned long size; + size_t size; size=_msize(memblock); PIC_Sys_MEM_Allocated-=size; PIC_Sys_MEM_NbAllocs--; free(memblock); } /* ----- */ -unsigned long Pic__msize(void *memblock) +size_t Pic__msize(void *memblock) { return(_msize(memblock)); } /* ----- */ -unsigned long PIC_GetMemNbAllocs(void) +size_t PIC_GetMemNbAllocs(void) { return(PIC_Sys_MEM_NbAllocs); } /* ----- */ -unsigned long PIC_GetMemAllocated(void) +size_t PIC_GetMemAllocated(void) { return(PIC_Sys_MEM_Allocated); } @@ -74,7 +74,7 @@ static unsigned char PIC_ErrorString[PIC_ERRSIZE]; static unsigned char PIC_Sys_FnctActive=0; static void (*PIC_Sys_Fnct)(void); -void Pic_SetError(unsigned char *msg, ...) +void Pic_SetError(const char *msg, ...) { unsigned char curerr[PIC_ERRSIZE],olderr[PIC_ERRSIZE]; va_list args; diff --git a/code/nel/tools/3d/tile_edit_qt/pic/Pic_BMP.c b/code/nel/tools/3d/tile_edit_qt/pic/Pic_BMP.c index 53dc957f5..1119766da 100644 --- a/code/nel/tools/3d/tile_edit_qt/pic/Pic_BMP.c +++ b/code/nel/tools/3d/tile_edit_qt/pic/Pic_BMP.c @@ -117,7 +117,7 @@ unsigned long Pic_BMP_Write( const char *FileName, /* ---------------------------------------------------------------------------------------------------------------------------------- */ -unsigned long Pic_BMP_Read( unsigned char *FileName, +unsigned long Pic_BMP_Read( const char *FileName, unsigned char **ppPal, unsigned char **ppDatas, unsigned long *pWidth, unsigned long *pHeight, unsigned long *pDepth) diff --git a/code/nel/tools/3d/tile_edit_qt/pic/Pic_JPG.c b/code/nel/tools/3d/tile_edit_qt/pic/Pic_JPG.c index f13f93b13..dc22afadf 100644 --- a/code/nel/tools/3d/tile_edit_qt/pic/Pic_JPG.c +++ b/code/nel/tools/3d/tile_edit_qt/pic/Pic_JPG.c @@ -31,7 +31,7 @@ void my_error_exit(j_common_ptr cinfo) /* ---------------------------------------------------------------------------------------------------------------------------------- */ -unsigned long Pic_JPG_Read(unsigned char *FileName, unsigned char **ppPal, unsigned char **ppDatas, unsigned long *w, unsigned long *h) +unsigned long Pic_JPG_Read(const char *FileName, unsigned char **ppPal, unsigned char **ppDatas, unsigned long *w, unsigned long *h) { struct jpeg_decompress_struct cinfo; struct my_error_mgr jerr; @@ -114,7 +114,7 @@ unsigned long Pic_JPG_Read(unsigned char *FileName, unsigned char **ppPal, unsig /* ---------------------------------------------------------------------------------------------------------------------------------- */ -unsigned long Pic_JPG_Write(unsigned char *FileName, unsigned long Qual, unsigned char *pDatas, unsigned long w, unsigned long h) +unsigned long Pic_JPG_Write(const char *FileName, unsigned long Qual, unsigned char *pDatas, unsigned long w, unsigned long h) { struct jpeg_compress_struct cinfo; struct my_error_mgr jerr; diff --git a/code/nel/tools/3d/tile_edit_qt/pic/Pic_TGA.c b/code/nel/tools/3d/tile_edit_qt/pic/Pic_TGA.c index 5f598d4eb..4c458dc83 100644 --- a/code/nel/tools/3d/tile_edit_qt/pic/Pic_TGA.c +++ b/code/nel/tools/3d/tile_edit_qt/pic/Pic_TGA.c @@ -27,7 +27,7 @@ typedef struct TGA_HEADER /* ---------------------------------------------------------------------------------------------------------------------------------- */ -unsigned long Pic_TGA_Read( unsigned char *FileName, +unsigned long Pic_TGA_Read( const char *FileName, unsigned char **ppPal, unsigned char **ppDatas, unsigned long *pWidth, unsigned long *pHeight, unsigned long *pDepth) @@ -140,7 +140,7 @@ unsigned long Pic_TGA_Read( unsigned char *FileName, /* ---------------------------------------------------------------------------------------------------------------------------------- */ -unsigned long Pic_TGA_Write( unsigned char *FileName, +unsigned long Pic_TGA_Write( const char *FileName, unsigned char *pPal,unsigned char *pDatas, unsigned long w, unsigned long h, unsigned long d) { diff --git a/code/nel/tools/3d/tile_edit_qt/pic/pic_private.h b/code/nel/tools/3d/tile_edit_qt/pic/pic_private.h index 53166396d..96b7a0e94 100644 --- a/code/nel/tools/3d/tile_edit_qt/pic/pic_private.h +++ b/code/nel/tools/3d/tile_edit_qt/pic/pic_private.h @@ -25,28 +25,28 @@ typedef struct PIC_PICTURE */ -extern unsigned long Pic_JPG_Read( unsigned char *FileName, +extern unsigned long Pic_JPG_Read( const char *FileName, unsigned char **ppPal, unsigned char **ppDatas, unsigned long *w, unsigned long *h); -extern unsigned long Pic_JPG_Write( unsigned char *FileName, +extern unsigned long Pic_JPG_Write( const char *FileName, unsigned long Qual, unsigned char *pDatas, unsigned long w, unsigned long h); /* * TGA */ -extern unsigned long Pic_TGA_Read( unsigned char *FileName, +extern unsigned long Pic_TGA_Read( const char *FileName, unsigned char **ppPal, unsigned char **ppDatas, unsigned long *pWidth, unsigned long *pHeight, unsigned long *pDepth); -extern unsigned long Pic_TGA_Write( unsigned char *FileName, +extern unsigned long Pic_TGA_Write( const char *FileName, unsigned char *pPal,unsigned char *pDatas, unsigned long w, unsigned long h, unsigned long d); /* * BMP */ -extern unsigned long Pic_BMP_Read( unsigned char *FileName, +extern unsigned long Pic_BMP_Read( const char *FileName, unsigned char **ppPal, unsigned char **ppDatas, unsigned long *pWidth, unsigned long *pHeight, unsigned long *pDepth); @@ -57,11 +57,11 @@ extern unsigned long Pic_BMP_Write( const char *FileName, /* * System */ -extern void* Pic_malloc(unsigned long size); -extern void* Pic_calloc(unsigned long count, unsigned long size); +extern void* Pic_malloc(size_t size); +extern void* Pic_calloc(size_t count, size_t size); extern void Pic_free(void *memblock); -extern unsigned long Pic__msize(void *memblock); -extern void Pic_SetError(unsigned char *msg, ...); +extern size_t Pic__msize(void *memblock); +extern void Pic_SetError(const char *msg, ...); /* ---------------------------------------------------------------------------------------------------------------------------------- */