From cd2c4f5861c89f0925a1a706e38535d6c11cc3a0 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 13 Mar 2005 11:37:47 +0000 Subject: Converted ChatBox into a proper ChatWindow in response to changes by Chetic. --- src/resources/image.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/resources/image.cpp') diff --git a/src/resources/image.cpp b/src/resources/image.cpp index f985b759..f976466e 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -201,11 +201,8 @@ Image* Image::load(const std::string &filePath, int flags) Image* Image::load(void* buffer, unsigned int bufferSize) { - // Define our RWops structure - SDL_RWops* rw = NULL; - - // Load the raw file data from the buffer - rw = SDL_RWFromMem(buffer, bufferSize); + // Load the raw file data from the buffer in an RWops structure + SDL_RWops *rw = SDL_RWFromMem(buffer, bufferSize); // Use SDL_Image to load the raw image data SDL_Surface* texture = IMG_Load_RW(rw, 1); -- cgit v1.2.3-70-g09d2