mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
less compiler warnings, remove unused bit of code
This commit is contained in:
parent
f20de966cb
commit
49f847a984
@ -118,6 +118,7 @@ typedef struct TextureRec_ { float U1, V1, U2, V2; } TextureRec;
|
||||
#define CC_BUILD_SDL
|
||||
#define CC_BUILD_POSIX
|
||||
#define CC_BUILD_GLMODERN
|
||||
#error "Web backend is still a WIP. Please do not publicly mention it, thanks."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
13
src/Stream.c
13
src/Stream.c
@ -36,8 +36,11 @@ ReturnCode Stream_Write(struct Stream* s, const uint8_t* buffer, uint32_t count)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ReturnCode Stream_DefaultIO(struct Stream* s, const uint8_t* data, uint32_t count, uint32_t* modified) {
|
||||
*modified = 0; return ReturnCode_NotSupported;
|
||||
static ReturnCode Stream_DefaultRead(struct Stream* s, uint8_t* data, uint32_t count, uint32_t* modified) {
|
||||
return ReturnCode_NotSupported;
|
||||
}
|
||||
static ReturnCode Stream_DefaultWrite(struct Stream* s, const uint8_t* data, uint32_t count, uint32_t* modified) {
|
||||
return ReturnCode_NotSupported;
|
||||
}
|
||||
ReturnCode Stream_DefaultReadU8(struct Stream* s, uint8_t* data) {
|
||||
uint32_t modified;
|
||||
@ -64,14 +67,14 @@ static ReturnCode Stream_DefaultSeek(struct Stream* s, uint32_t pos) {
|
||||
return ReturnCode_NotSupported;
|
||||
}
|
||||
static ReturnCode Stream_DefaultGet(struct Stream* s, uint32_t* value) {
|
||||
*value = 0; return ReturnCode_NotSupported;
|
||||
return ReturnCode_NotSupported;
|
||||
}
|
||||
static ReturnCode Stream_DefaultClose(struct Stream* s) { return 0; }
|
||||
|
||||
void Stream_Init(struct Stream* s) {
|
||||
s->Read = Stream_DefaultIO;
|
||||
s->Read = Stream_DefaultRead;
|
||||
s->ReadU8 = Stream_DefaultReadU8;
|
||||
s->Write = Stream_DefaultIO;
|
||||
s->Write = Stream_DefaultWrite;
|
||||
s->Skip = Stream_DefaultSkip;
|
||||
|
||||
s->Seek = Stream_DefaultSeek;
|
||||
|
@ -1331,7 +1331,7 @@ void Window_ProcessEvents(void) {
|
||||
reply.xselection.requestor = e.xselectionrequest.requestor;
|
||||
reply.xselection.selection = e.xselectionrequest.selection;
|
||||
reply.xselection.target = e.xselectionrequest.target;
|
||||
reply.xselection.property = NULL;
|
||||
reply.xselection.property = 0;
|
||||
reply.xselection.time = e.xselectionrequest.time;
|
||||
|
||||
if (e.xselectionrequest.selection == xa_clipboard && e.xselectionrequest.target == xa_utf8_string && clipboard_copy_text.length) {
|
||||
|
@ -428,84 +428,6 @@ FT_BEGIN_HEADER
|
||||
FT_EXPORT( void )
|
||||
FT_Add_Default_Modules( FT_Library library );
|
||||
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @section:
|
||||
* truetype_engine
|
||||
*
|
||||
* @title:
|
||||
* The TrueType Engine
|
||||
*
|
||||
* @abstract:
|
||||
* TrueType bytecode support.
|
||||
*
|
||||
* @description:
|
||||
* This section contains a function used to query the level of TrueType
|
||||
* bytecode support compiled in this version of the library.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @enum:
|
||||
* FT_TrueTypeEngineType
|
||||
*
|
||||
* @description:
|
||||
* A list of values describing which kind of TrueType bytecode
|
||||
* engine is implemented in a given FT_Library instance. It is used
|
||||
* by the @FT_Get_TrueType_Engine_Type function.
|
||||
*
|
||||
* @values:
|
||||
* FT_TRUETYPE_ENGINE_TYPE_NONE ::
|
||||
* The library doesn't implement any kind of bytecode interpreter.
|
||||
*
|
||||
* FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::
|
||||
* Deprecated and removed.
|
||||
*
|
||||
* FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
|
||||
* The library implements a bytecode interpreter that covers
|
||||
* the full instruction set of the TrueType virtual machine (this
|
||||
* was governed by patents until May 2010, hence the name).
|
||||
*
|
||||
* @since:
|
||||
* 2.2
|
||||
*
|
||||
*/
|
||||
typedef enum FT_TrueTypeEngineType_
|
||||
{
|
||||
FT_TRUETYPE_ENGINE_TYPE_NONE = 0,
|
||||
FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,
|
||||
FT_TRUETYPE_ENGINE_TYPE_PATENTED
|
||||
|
||||
} FT_TrueTypeEngineType;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @func:
|
||||
* FT_Get_TrueType_Engine_Type
|
||||
*
|
||||
* @description:
|
||||
* Return an @FT_TrueTypeEngineType value to indicate which level of
|
||||
* the TrueType virtual machine a given library instance supports.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
* A library instance.
|
||||
*
|
||||
* @return:
|
||||
* A value indicating which level is supported.
|
||||
*
|
||||
* @since:
|
||||
* 2.2
|
||||
*
|
||||
*/
|
||||
FT_EXPORT( FT_TrueTypeEngineType )
|
||||
FT_Get_TrueType_Engine_Type( FT_Library library );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
|
@ -37,45 +37,10 @@
|
||||
#include FT_SERVICE_POSTSCRIPT_NAME_H
|
||||
#include FT_SERVICE_GLYPH_DICT_H
|
||||
#include FT_SERVICE_TT_CMAP_H
|
||||
#include FT_SERVICE_TRUETYPE_ENGINE_H
|
||||
|
||||
#include FT_DRIVER_H
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
#include FT_BITMAP_H
|
||||
|
||||
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
|
||||
/* We disable the warning `conversion from XXX to YYY, */
|
||||
/* possible loss of data' in order to compile cleanly with */
|
||||
/* the maximum level of warnings: `md5.c' is non-FreeType */
|
||||
/* code, and it gets used during development builds only. */
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4244 )
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* It's easiest to include `md5.c' directly. However, since OpenSSL */
|
||||
/* also provides the same functions, there might be conflicts if */
|
||||
/* both FreeType and OpenSSL are built as static libraries. For */
|
||||
/* this reason, we put the MD5 stuff into the `FT_' namespace. */
|
||||
#define MD5_u32plus FT_MD5_u32plus
|
||||
#define MD5_CTX FT_MD5_CTX
|
||||
#define MD5_Init FT_MD5_Init
|
||||
#define MD5_Update FT_MD5_Update
|
||||
#define MD5_Final FT_MD5_Final
|
||||
|
||||
#undef HAVE_OPENSSL
|
||||
|
||||
#include "md5.c"
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
#endif /* FT_DEBUG_LEVEL_TRACE */
|
||||
|
||||
|
||||
#define GRID_FIT_METRICS
|
||||
|
||||
|
||||
@ -4204,37 +4169,6 @@
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in ftmodapi.h */
|
||||
|
||||
FT_EXPORT_DEF( FT_TrueTypeEngineType )
|
||||
FT_Get_TrueType_Engine_Type( FT_Library library )
|
||||
{
|
||||
FT_TrueTypeEngineType result = FT_TRUETYPE_ENGINE_TYPE_NONE;
|
||||
|
||||
|
||||
if ( library )
|
||||
{
|
||||
FT_Module module = FT_Get_Module( library, "truetype" );
|
||||
|
||||
|
||||
if ( module )
|
||||
{
|
||||
FT_Service_TrueTypeEngine service;
|
||||
|
||||
|
||||
service = (FT_Service_TrueTypeEngine)
|
||||
ft_module_get_service( module,
|
||||
FT_SERVICE_ID_TRUETYPE_ENGINE,
|
||||
0 );
|
||||
if ( service )
|
||||
result = service->engine_type;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
|
@ -1003,7 +1003,6 @@ FT_BEGIN_HEADER
|
||||
#define FT_SERVICE_POSTSCRIPT_NAME_H "svpostnm.h"
|
||||
#define FT_SERVICE_PROPERTIES_H "svprop.h"
|
||||
#define FT_SERVICE_SFNT_H "svsfnt.h"
|
||||
#define FT_SERVICE_TRUETYPE_ENGINE_H "svtteng.h"
|
||||
#define FT_SERVICE_TRUETYPE_GLYF_H "svttglyf.h"
|
||||
#define FT_SERVICE_TT_CMAP_H "svttcmap.h"
|
||||
|
||||
|
@ -1,53 +0,0 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* svtteng.h */
|
||||
/* */
|
||||
/* The FreeType TrueType engine query service (specification). */
|
||||
/* */
|
||||
/* Copyright 2006-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef SVTTENG_H_
|
||||
#define SVTTENG_H_
|
||||
|
||||
#include FT_INTERNAL_SERVICE_H
|
||||
#include FT_MODULE_H
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/*
|
||||
* SFNT table loading service.
|
||||
*/
|
||||
|
||||
#define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine"
|
||||
|
||||
/*
|
||||
* Used to implement FT_Get_TrueType_Engine_Type
|
||||
*/
|
||||
|
||||
FT_DEFINE_SERVICE( TrueTypeEngine )
|
||||
{
|
||||
FT_TrueTypeEngineType engine_type;
|
||||
};
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* SVTTENG_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -28,7 +28,6 @@
|
||||
#include FT_SERVICE_METRICS_VARIATIONS_H
|
||||
#endif
|
||||
|
||||
#include FT_SERVICE_TRUETYPE_ENGINE_H
|
||||
#include FT_SERVICE_TRUETYPE_GLYF_H
|
||||
#include FT_SERVICE_PROPERTIES_H
|
||||
#include FT_DRIVER_H
|
||||
@ -468,20 +467,6 @@
|
||||
#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
|
||||
|
||||
|
||||
static const FT_Service_TrueTypeEngineRec tt_service_truetype_engine =
|
||||
{
|
||||
#ifdef TT_USE_BYTECODE_INTERPRETER
|
||||
|
||||
FT_TRUETYPE_ENGINE_TYPE_PATENTED
|
||||
|
||||
#else /* !TT_USE_BYTECODE_INTERPRETER */
|
||||
|
||||
FT_TRUETYPE_ENGINE_TYPE_NONE
|
||||
|
||||
#endif /* TT_USE_BYTECODE_INTERPRETER */
|
||||
};
|
||||
|
||||
|
||||
FT_DEFINE_SERVICE_TTGLYFREC(
|
||||
tt_service_truetype_glyf,
|
||||
|
||||
@ -500,11 +485,10 @@
|
||||
FT_SERVICE_ID_TT_GLYF, &tt_service_truetype_glyf,
|
||||
FT_SERVICE_ID_PROPERTIES, &tt_service_properties)
|
||||
#else
|
||||
FT_DEFINE_SERVICEDESCREC4(
|
||||
FT_DEFINE_SERVICEDESCREC3(
|
||||
tt_services,
|
||||
|
||||
FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_TRUETYPE,
|
||||
FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
|
||||
FT_SERVICE_ID_TT_GLYF, &tt_service_truetype_glyf,
|
||||
FT_SERVICE_ID_PROPERTIES, &tt_service_properties)
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user