From 3a0e16802b9838ad77d96276bfaa213d8285b76e Mon Sep 17 00:00:00 2001 From: Eric Scrivner Date: Sat, 12 Mar 2005 18:04:55 +0000 Subject: Changed RWops constructor a bit. --- src/resources/image.cpp | 4 ++-- src/resources/image.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 989666f2..f985b759 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -199,13 +199,13 @@ Image* Image::load(const std::string &filePath, int flags) #endif } -Image* Image::load(const char* buffer, unsigned int bufferSize) +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((void*)buffer, bufferSize); + rw = SDL_RWFromMem(buffer, bufferSize); // Use SDL_Image to load the raw image data SDL_Surface* texture = IMG_Load_RW(rw, 1); diff --git a/src/resources/image.h b/src/resources/image.h index f5869167..ebee50d3 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -73,7 +73,7 @@ class Image : public Resource * @return NULL if the an error occurred, a valid pointer * otherwise. */ - static Image *load(const char* buffer, unsigned int bufferSize); + static Image *load(void* buffer, unsigned int bufferSize); /** * Creates a new empty image with given height and width. -- cgit v1.2.3-70-g09d2