mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-24 13:53:36 +02:00
Improve const correctness
This commit is contained in:
1 parent
7f5807a6b5
commit
360268ea39
71 files changed
+82
-82
No files matched your search
+2
-2
@@ -12,7 +12,7 @@ int main(void)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// Load a sprite to display
|
||||
sfTexture* texture = sfTexture_createFromFile("sfml_logo.png", NULL);
|
||||
const sfTexture* texture = sfTexture_createFromFile("sfml_logo.png", NULL);
|
||||
if (!texture)
|
||||
{
|
||||
sfRenderWindow_destroy(window);
|
||||
@@ -23,7 +23,7 @@ int main(void)
|
||||
sfSprite_setPosition(sprite, spritePosition);
|
||||
|
||||
// Create a graphical text to display
|
||||
sfFont* font = sfFont_createFromFile("tuffy.ttf");
|
||||
const sfFont* font = sfFont_createFromFile("tuffy.ttf");
|
||||
if (!font)
|
||||
{
|
||||
sfSprite_destroy(sprite);
|
||||
|
||||
@@ -104,7 +104,7 @@ CSFML_AUDIO_API sfMusic* sfMusic_createFromStream(sfInputStream* stream);
|
||||
/// \param music Music to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfMusic_destroy(sfMusic* music);
|
||||
CSFML_AUDIO_API void sfMusic_destroy(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set whether or not a music should loop after reaching the end
|
||||
|
||||
@@ -61,7 +61,7 @@ CSFML_AUDIO_API sfSound* sfSound_copy(const sfSound* sound);
|
||||
/// \param sound Sound to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSound_destroy(sfSound* sound);
|
||||
CSFML_AUDIO_API void sfSound_destroy(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start or resume playing a sound
|
||||
|
||||
@@ -120,7 +120,7 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_copy(const sfSoundBuffer* soundBuff
|
||||
/// \param soundBuffer Sound buffer to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSoundBuffer_destroy(sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API void sfSoundBuffer_destroy(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Save a sound buffer to an audio file
|
||||
|
||||
@@ -46,7 +46,7 @@ CSFML_AUDIO_API sfSoundBufferRecorder* sfSoundBufferRecorder_create(void);
|
||||
/// \param soundBufferRecorder Sound buffer recorder to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSoundBufferRecorder_destroy(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
CSFML_AUDIO_API void sfSoundBufferRecorder_destroy(const sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start the capture of a sound recorder recorder
|
||||
|
||||
@@ -62,7 +62,7 @@ CSFML_AUDIO_API sfSoundRecorder* sfSoundRecorder_create(sfSoundRecorderStartCall
|
||||
/// \param soundRecorder Sound recorder to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSoundRecorder_destroy(sfSoundRecorder* soundRecorder);
|
||||
CSFML_AUDIO_API void sfSoundRecorder_destroy(const sfSoundRecorder* soundRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start the capture of a sound recorder
|
||||
|
||||
@@ -81,7 +81,7 @@ CSFML_AUDIO_API sfSoundStream* sfSoundStream_create(
|
||||
/// \param soundStream Sound stream to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSoundStream_destroy(sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API void sfSoundStream_destroy(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Start or resume playing a sound stream
|
||||
|
||||
@@ -62,7 +62,7 @@ CSFML_GRAPHICS_API sfCircleShape* sfCircleShape_copy(const sfCircleShape* shape)
|
||||
/// \param shape Shape to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_destroy(sfCircleShape* shape);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_destroy(const sfCircleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a circle shape
|
||||
|
||||
@@ -62,7 +62,7 @@ CSFML_GRAPHICS_API sfConvexShape* sfConvexShape_copy(const sfConvexShape* shape)
|
||||
/// \param shape Shape to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_destroy(sfConvexShape* shape);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_destroy(const sfConvexShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a convex shape
|
||||
|
||||
@@ -84,7 +84,7 @@ CSFML_GRAPHICS_API sfFont* sfFont_copy(const sfFont* font);
|
||||
/// \param font Font to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfFont_destroy(sfFont* font);
|
||||
CSFML_GRAPHICS_API void sfFont_destroy(const sfFont* font);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a glyph in a font
|
||||
|
||||
@@ -140,7 +140,7 @@ CSFML_GRAPHICS_API sfImage* sfImage_copy(const sfImage* image);
|
||||
/// \param image Image to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfImage_destroy(sfImage* image);
|
||||
CSFML_GRAPHICS_API void sfImage_destroy(const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Save an image to a file on disk
|
||||
|
||||
@@ -62,7 +62,7 @@ CSFML_GRAPHICS_API sfRectangleShape* sfRectangleShape_copy(const sfRectangleShap
|
||||
/// \param shape Shape to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRectangleShape_destroy(sfRectangleShape* shape);
|
||||
CSFML_GRAPHICS_API void sfRectangleShape_destroy(const sfRectangleShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a rectangle shape
|
||||
|
||||
@@ -58,7 +58,7 @@ CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_create(sfVector2u size, cons
|
||||
/// \param renderTexture Render texture to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_destroy(sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_destroy(const sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the size of the rendering region of a render texture
|
||||
|
||||
@@ -93,7 +93,7 @@ CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_createFromHandle(sfWindowHandl
|
||||
/// \param renderWindow Render window to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_destroy(sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_destroy(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Close a render window (but doesn't destroy the internal data)
|
||||
|
||||
@@ -112,7 +112,7 @@ CSFML_GRAPHICS_API sfShader* sfShader_createFromStream(sfInputStream* vertexShad
|
||||
/// \param shader Shader to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_destroy(sfShader* shader);
|
||||
CSFML_GRAPHICS_API void sfShader_destroy(const sfShader* shader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Specify value for \p float uniform
|
||||
|
||||
@@ -61,7 +61,7 @@ CSFML_GRAPHICS_API sfShape* sfShape_create(sfShapeGetPointCountCallback getPoint
|
||||
/// \param shape Shape to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_destroy(sfShape* shape);
|
||||
CSFML_GRAPHICS_API void sfShape_destroy(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a shape
|
||||
|
||||
@@ -63,7 +63,7 @@ CSFML_GRAPHICS_API sfSprite* sfSprite_copy(const sfSprite* sprite);
|
||||
/// \param sprite Sprite to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_destroy(sfSprite* sprite);
|
||||
CSFML_GRAPHICS_API void sfSprite_destroy(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a sprite
|
||||
|
||||
@@ -77,7 +77,7 @@ CSFML_GRAPHICS_API sfText* sfText_copy(const sfText* text);
|
||||
/// \param text Text to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_destroy(sfText* text);
|
||||
CSFML_GRAPHICS_API void sfText_destroy(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a text
|
||||
|
||||
@@ -175,7 +175,7 @@ CSFML_GRAPHICS_API sfTexture* sfTexture_copy(const sfTexture* texture);
|
||||
/// \param texture Texture to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_destroy(sfTexture* texture);
|
||||
CSFML_GRAPHICS_API void sfTexture_destroy(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the size of the texture
|
||||
|
||||
@@ -58,7 +58,7 @@ CSFML_GRAPHICS_API sfTransformable* sfTransformable_copy(const sfTransformable*
|
||||
/// \param transformable Transformable to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTransformable_destroy(sfTransformable* transformable);
|
||||
CSFML_GRAPHICS_API void sfTransformable_destroy(const sfTransformable* transformable);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a transformable
|
||||
|
||||
@@ -61,7 +61,7 @@ CSFML_GRAPHICS_API sfVertexArray* sfVertexArray_copy(const sfVertexArray* vertex
|
||||
/// \param vertexArray Vertex array to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfVertexArray_destroy(sfVertexArray* vertexArray);
|
||||
CSFML_GRAPHICS_API void sfVertexArray_destroy(const sfVertexArray* vertexArray);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the vertex count of a vertex array
|
||||
|
||||
@@ -87,7 +87,7 @@ CSFML_GRAPHICS_API sfVertexBuffer* sfVertexBuffer_copy(const sfVertexBuffer* ver
|
||||
/// \param vertexBuffer Vertex buffer to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfVertexBuffer_destroy(sfVertexBuffer* vertexBuffer);
|
||||
CSFML_GRAPHICS_API void sfVertexBuffer_destroy(const sfVertexBuffer* vertexBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the vertex count
|
||||
|
||||
@@ -70,7 +70,7 @@ CSFML_GRAPHICS_API sfView* sfView_copy(const sfView* view);
|
||||
/// \param view View to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfView_destroy(sfView* view);
|
||||
CSFML_GRAPHICS_API void sfView_destroy(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the center of a view
|
||||
|
||||
@@ -120,7 +120,7 @@ typedef enum
|
||||
/// \param ftpListingResponse Ftp listing response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfFtpListingResponse_destroy(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_NETWORK_API void sfFtpListingResponse_destroy(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a FTP listing response status code means a success
|
||||
@@ -182,7 +182,7 @@ CSFML_NETWORK_API const char* sfFtpListingResponse_getName(const sfFtpListingRes
|
||||
/// \param ftpDirectoryResponse Ftp directory response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfFtpDirectoryResponse_destroy(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_NETWORK_API void sfFtpDirectoryResponse_destroy(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a FTP directory response status code means a success
|
||||
@@ -251,7 +251,7 @@ CSFML_NETWORK_API const sfChar32* sfFtpDirectoryResponse_getDirectoryUnicode(con
|
||||
/// \param ftpResponse Ftp response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfFtpResponse_destroy(sfFtpResponse* ftpResponse);
|
||||
CSFML_NETWORK_API void sfFtpResponse_destroy(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a FTP response status code means a success
|
||||
@@ -300,7 +300,7 @@ CSFML_NETWORK_API sfFtp* sfFtp_create(void);
|
||||
/// \param ftp Ftp object to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfFtp_destroy(sfFtp* ftp);
|
||||
CSFML_NETWORK_API void sfFtp_destroy(const sfFtp* ftp);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Connect to the specified FTP server
|
||||
|
||||
@@ -102,7 +102,7 @@ CSFML_NETWORK_API sfHttpRequest* sfHttpRequest_create(void);
|
||||
/// \param httpRequest HTTP request to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfHttpRequest_destroy(sfHttpRequest* httpRequest);
|
||||
CSFML_NETWORK_API void sfHttpRequest_destroy(const sfHttpRequest* httpRequest);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the value of a header field of a HTTP request
|
||||
@@ -177,7 +177,7 @@ CSFML_NETWORK_API void sfHttpRequest_setBody(sfHttpRequest* httpRequest, const c
|
||||
/// \param httpResponse HTTP response to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfHttpResponse_destroy(sfHttpResponse* httpResponse);
|
||||
CSFML_NETWORK_API void sfHttpResponse_destroy(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the value of a field of a HTTP response
|
||||
@@ -259,7 +259,7 @@ CSFML_NETWORK_API sfHttp* sfHttp_create(void);
|
||||
/// \param http Http object to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfHttp_destroy(sfHttp* http);
|
||||
CSFML_NETWORK_API void sfHttp_destroy(const sfHttp* http);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the target host of a HTTP object
|
||||
|
||||
@@ -58,7 +58,7 @@ CSFML_NETWORK_API sfPacket* sfPacket_copy(const sfPacket* packet);
|
||||
/// \param packet Packet to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfPacket_destroy(sfPacket* packet);
|
||||
CSFML_NETWORK_API void sfPacket_destroy(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Append data to the end of a packet
|
||||
|
||||
@@ -57,7 +57,7 @@ CSFML_NETWORK_API sfSocketSelector* sfSocketSelector_copy(const sfSocketSelector
|
||||
/// \param selector Socket selector to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfSocketSelector_destroy(sfSocketSelector* selector);
|
||||
CSFML_NETWORK_API void sfSocketSelector_destroy(const sfSocketSelector* selector);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Add a new socket to a socket selector
|
||||
|
||||
@@ -48,7 +48,7 @@ CSFML_NETWORK_API sfTcpListener* sfTcpListener_create(void);
|
||||
/// \param listener TCP listener to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfTcpListener_destroy(sfTcpListener* listener);
|
||||
CSFML_NETWORK_API void sfTcpListener_destroy(const sfTcpListener* listener);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the blocking state of a TCP listener
|
||||
|
||||
@@ -51,7 +51,7 @@ CSFML_NETWORK_API sfTcpSocket* sfTcpSocket_create(void);
|
||||
/// \param socket TCP socket to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfTcpSocket_destroy(sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API void sfTcpSocket_destroy(const sfTcpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the blocking state of a TCP listener
|
||||
|
||||
@@ -50,7 +50,7 @@ CSFML_NETWORK_API sfUdpSocket* sfUdpSocket_create(void);
|
||||
/// \param socket UDP socket to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfUdpSocket_destroy(sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API void sfUdpSocket_destroy(const sfUdpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the blocking state of a UDP listener
|
||||
|
||||
@@ -48,7 +48,7 @@ CSFML_SYSTEM_API sfBuffer* sfBuffer_create(void);
|
||||
/// \param buffer Buffer to delete
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_SYSTEM_API void sfBuffer_destroy(sfBuffer* buffer);
|
||||
CSFML_SYSTEM_API void sfBuffer_destroy(const sfBuffer* buffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the size of a buffer
|
||||
|
||||
@@ -57,7 +57,7 @@ CSFML_SYSTEM_API sfClock* sfClock_copy(const sfClock* clock);
|
||||
/// \param clock Clock to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_SYSTEM_API void sfClock_destroy(sfClock* clock);
|
||||
CSFML_SYSTEM_API void sfClock_destroy(const sfClock* clock);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the time elapsed in a clock
|
||||
|
||||
@@ -50,7 +50,7 @@ CSFML_WINDOW_API sfContext* sfContext_create(void);
|
||||
/// \param context Context to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfContext_destroy(sfContext* context);
|
||||
CSFML_WINDOW_API void sfContext_destroy(const sfContext* context);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check whether a given OpenGL extension is available.
|
||||
|
||||
@@ -141,4 +141,4 @@ CSFML_WINDOW_API sfCursor* sfCursor_createFromSystem(sfCursorType type);
|
||||
/// \param cursor Cursor to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfCursor_destroy(sfCursor* cursor);
|
||||
CSFML_WINDOW_API void sfCursor_destroy(const sfCursor* cursor);
|
||||
@@ -146,7 +146,7 @@ CSFML_WINDOW_API sfWindow* sfWindow_createFromHandle(sfWindowHandle handle, cons
|
||||
/// \param window Window to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_destroy(sfWindow* window);
|
||||
CSFML_WINDOW_API void sfWindow_destroy(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Close a window and destroy all the attached resources
|
||||
|
||||
@@ -117,7 +117,7 @@ CSFML_WINDOW_API sfWindowBase* sfWindowBase_createFromHandle(sfWindowHandle hand
|
||||
/// \param windowBase Window to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_destroy(sfWindowBase* windowBase);
|
||||
CSFML_WINDOW_API void sfWindowBase_destroy(const sfWindowBase* windowBase);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Close a window and destroy all the attached resources
|
||||
|
||||
@@ -76,7 +76,7 @@ sfMusic* sfMusic_createFromStream(sfInputStream* stream)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfMusic_destroy(sfMusic* music)
|
||||
void sfMusic_destroy(const sfMusic* music)
|
||||
{
|
||||
delete music;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ sfSound* sfSound_copy(const sfSound* sound)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSound_destroy(sfSound* sound)
|
||||
void sfSound_destroy(const sfSound* sound)
|
||||
{
|
||||
delete sound;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ sfSoundBuffer* sfSoundBuffer_copy(const sfSoundBuffer* soundBuffer)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSoundBuffer_destroy(sfSoundBuffer* soundBuffer)
|
||||
void sfSoundBuffer_destroy(const sfSoundBuffer* soundBuffer)
|
||||
{
|
||||
delete soundBuffer;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ sfSoundBufferRecorder* sfSoundBufferRecorder_create()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSoundBufferRecorder_destroy(sfSoundBufferRecorder* soundBufferRecorder)
|
||||
void sfSoundBufferRecorder_destroy(const sfSoundBufferRecorder* soundBufferRecorder)
|
||||
{
|
||||
delete soundBufferRecorder;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ sfSoundRecorder* sfSoundRecorder_create(sfSoundRecorderStartCallback onStart,
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSoundRecorder_destroy(sfSoundRecorder* soundRecorder)
|
||||
void sfSoundRecorder_destroy(const sfSoundRecorder* soundRecorder)
|
||||
{
|
||||
delete soundRecorder;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ sfSoundStream* sfSoundStream_create(
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSoundStream_destroy(sfSoundStream* soundStream)
|
||||
void sfSoundStream_destroy(const sfSoundStream* soundStream)
|
||||
{
|
||||
delete soundStream;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ sfCircleShape* sfCircleShape_copy(const sfCircleShape* shape)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfCircleShape_destroy(sfCircleShape* shape)
|
||||
void sfCircleShape_destroy(const sfCircleShape* shape)
|
||||
{
|
||||
delete shape;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ sfConvexShape* sfConvexShape_copy(const sfConvexShape* shape)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfConvexShape_destroy(sfConvexShape* shape)
|
||||
void sfConvexShape_destroy(const sfConvexShape* shape)
|
||||
{
|
||||
delete shape;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ sfFont* sfFont_copy(const sfFont* font)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfFont_destroy(sfFont* font)
|
||||
void sfFont_destroy(const sfFont* font)
|
||||
{
|
||||
delete font;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ sfImage* sfImage_copy(const sfImage* image)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfImage_destroy(sfImage* image)
|
||||
void sfImage_destroy(const sfImage* image)
|
||||
{
|
||||
delete image;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ sfRectangleShape* sfRectangleShape_copy(const sfRectangleShape* shape)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfRectangleShape_destroy(sfRectangleShape* shape)
|
||||
void sfRectangleShape_destroy(const sfRectangleShape* shape)
|
||||
{
|
||||
delete shape;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ sfRenderTexture* sfRenderTexture_create(sfVector2u size, const sfContextSettings
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfRenderTexture_destroy(sfRenderTexture* renderTexture)
|
||||
void sfRenderTexture_destroy(const sfRenderTexture* renderTexture)
|
||||
{
|
||||
delete renderTexture->Target;
|
||||
delete renderTexture;
|
||||
|
||||
@@ -109,7 +109,7 @@ sfRenderWindow* sfRenderWindow_createFromHandle(sfWindowHandle handle, const sfC
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfRenderWindow_destroy(sfRenderWindow* renderWindow)
|
||||
void sfRenderWindow_destroy(const sfRenderWindow* renderWindow)
|
||||
{
|
||||
delete renderWindow;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ sfShader* sfShader_createFromStream(sfInputStream* vertexShaderStream,
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfShader_destroy(sfShader* shader)
|
||||
void sfShader_destroy(const sfShader* shader)
|
||||
{
|
||||
delete shader;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ sfShape* sfShape_create(sfShapeGetPointCountCallback getPointCount, sfShapeGetPo
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfShape_destroy(sfShape* shape)
|
||||
void sfShape_destroy(const sfShape* shape)
|
||||
{
|
||||
delete shape;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ sfSprite* sfSprite_copy(const sfSprite* sprite)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSprite_destroy(sfSprite* sprite)
|
||||
void sfSprite_destroy(const sfSprite* sprite)
|
||||
{
|
||||
delete sprite;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ sfText* sfText_copy(const sfText* text)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfText_destroy(sfText* text)
|
||||
void sfText_destroy(const sfText* text)
|
||||
{
|
||||
delete text;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ sfTexture* sfTexture_copy(const sfTexture* texture)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfTexture_destroy(sfTexture* texture)
|
||||
void sfTexture_destroy(const sfTexture* texture)
|
||||
{
|
||||
delete texture;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ sfTransformable* sfTransformable_copy(const sfTransformable* transformable)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfTransformable_destroy(sfTransformable* transformable)
|
||||
void sfTransformable_destroy(const sfTransformable* transformable)
|
||||
{
|
||||
delete transformable;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ sfVertexArray* sfVertexArray_copy(const sfVertexArray* vertexArray)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfVertexArray_destroy(sfVertexArray* vertexArray)
|
||||
void sfVertexArray_destroy(const sfVertexArray* vertexArray)
|
||||
{
|
||||
delete vertexArray;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ sfVertexBuffer* sfVertexBuffer_copy(const sfVertexBuffer* vertexBuffer)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfVertexBuffer_destroy(sfVertexBuffer* vertexBuffer)
|
||||
void sfVertexBuffer_destroy(const sfVertexBuffer* vertexBuffer)
|
||||
{
|
||||
delete vertexBuffer;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ sfView* sfView_copy(const sfView* view)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfView_destroy(sfView* view)
|
||||
void sfView_destroy(const sfView* view)
|
||||
{
|
||||
delete view;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ static_assert(alignof(sfChar32) == alignof(char32_t));
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfFtpListingResponse_destroy(sfFtpListingResponse* ftpListingResponse)
|
||||
void sfFtpListingResponse_destroy(const sfFtpListingResponse* ftpListingResponse)
|
||||
{
|
||||
delete ftpListingResponse;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ const char* sfFtpListingResponse_getName(const sfFtpListingResponse* ftpListingR
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfFtpDirectoryResponse_destroy(sfFtpDirectoryResponse* ftpDirectoryResponse)
|
||||
void sfFtpDirectoryResponse_destroy(const sfFtpDirectoryResponse* ftpDirectoryResponse)
|
||||
{
|
||||
delete ftpDirectoryResponse;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ const sfChar32* sfFtpDirectoryResponse_getDirectoryUnicode(const sfFtpDirectoryR
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfFtpResponse_destroy(sfFtpResponse* ftpResponse)
|
||||
void sfFtpResponse_destroy(const sfFtpResponse* ftpResponse)
|
||||
{
|
||||
delete ftpResponse;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ sfFtp* sfFtp_create()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfFtp_destroy(sfFtp* ftp)
|
||||
void sfFtp_destroy(const sfFtp* ftp)
|
||||
{
|
||||
delete ftp;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ sfHttpRequest* sfHttpRequest_create()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfHttpRequest_destroy(sfHttpRequest* httpRequest)
|
||||
void sfHttpRequest_destroy(const sfHttpRequest* httpRequest)
|
||||
{
|
||||
delete httpRequest;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void sfHttpRequest_setBody(sfHttpRequest* httpRequest, const char* body)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfHttpResponse_destroy(sfHttpResponse* httpResponse)
|
||||
void sfHttpResponse_destroy(const sfHttpResponse* httpResponse)
|
||||
{
|
||||
delete httpResponse;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ sfHttp* sfHttp_create()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfHttp_destroy(sfHttp* http)
|
||||
void sfHttp_destroy(const sfHttp* http)
|
||||
{
|
||||
delete http;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ sfPacket* sfPacket_copy(const sfPacket* packet)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfPacket_destroy(sfPacket* packet)
|
||||
void sfPacket_destroy(const sfPacket* packet)
|
||||
{
|
||||
delete packet;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ sfSocketSelector* sfSocketSelector_copy(const sfSocketSelector* selector)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfSocketSelector_destroy(sfSocketSelector* selector)
|
||||
void sfSocketSelector_destroy(const sfSocketSelector* selector)
|
||||
{
|
||||
delete selector;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ sfTcpListener* sfTcpListener_create()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfTcpListener_destroy(sfTcpListener* listener)
|
||||
void sfTcpListener_destroy(const sfTcpListener* listener)
|
||||
{
|
||||
delete listener;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ sfTcpSocket* sfTcpSocket_create()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfTcpSocket_destroy(sfTcpSocket* socket)
|
||||
void sfTcpSocket_destroy(const sfTcpSocket* socket)
|
||||
{
|
||||
delete socket;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ sfUdpSocket* sfUdpSocket_create()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfUdpSocket_destroy(sfUdpSocket* socket)
|
||||
void sfUdpSocket_destroy(const sfUdpSocket* socket)
|
||||
{
|
||||
delete socket;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ sfBuffer* sfBuffer_create()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfBuffer_destroy(sfBuffer* buffer)
|
||||
void sfBuffer_destroy(const sfBuffer* buffer)
|
||||
{
|
||||
delete buffer;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ sfClock* sfClock_copy(const sfClock* clock)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfClock_destroy(sfClock* clock)
|
||||
void sfClock_destroy(const sfClock* clock)
|
||||
{
|
||||
delete clock;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ sfContext* sfContext_create()
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfContext_destroy(sfContext* context)
|
||||
void sfContext_destroy(const sfContext* context)
|
||||
{
|
||||
delete context;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ sfCursor* sfCursor_createFromSystem(sfCursorType type)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfCursor_destroy(sfCursor* cursor)
|
||||
void sfCursor_destroy(const sfCursor* cursor)
|
||||
{
|
||||
delete cursor;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ sfWindow* sfWindow_createFromHandle(sfWindowHandle handle, const sfContextSettin
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfWindow_destroy(sfWindow* window)
|
||||
void sfWindow_destroy(const sfWindow* window)
|
||||
{
|
||||
delete window;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ sfWindowBase* sfWindowBase_createFromHandle(sfWindowHandle handle)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfWindowBase_destroy(sfWindowBase* windowBase)
|
||||
void sfWindowBase_destroy(const sfWindowBase* windowBase)
|
||||
{
|
||||
delete windowBase;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user