diff --git a/SDL2pp/RWops.cc b/SDL2pp/RWops.cc index 49ebaea..93128a2 100644 --- a/SDL2pp/RWops.cc +++ b/SDL2pp/RWops.cc @@ -1,6 +1,6 @@ /* libSDL2pp - C++11 bindings/wrapper for SDL2 - Copyright (C) 2014 Dmitry Marakasov + Copyright (C) 2014-2015 Dmitry Marakasov This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -40,11 +40,11 @@ size_t RWops::StdReadFuncWrapper(SDL_RWops* context, void *ptr, size_t size, siz return sdl_rwops->read(sdl_rwops, ptr, size, maxnum); } -size_t RWops::StdWriteFuncWrapper(SDL_RWops* context, const void *ptr, size_t size, size_t maxnum) { +size_t RWops::StdWriteFuncWrapper(SDL_RWops* context, const void *ptr, size_t size, size_t num) { assert(context != nullptr); SDL_RWops* sdl_rwops = reinterpret_cast(context->hidden.unknown.data1); assert(sdl_rwops != nullptr); - return sdl_rwops->write(sdl_rwops, ptr, size, maxnum); + return sdl_rwops->write(sdl_rwops, ptr, size, num); } int RWops::StdCloseFuncWrapper(SDL_RWops* context) { @@ -77,11 +77,11 @@ size_t RWops::CustomReadFuncWrapper(SDL_RWops* context, void *ptr, size_t size, return custom_rwops->Read(ptr, size, maxnum); } -size_t RWops::CustomWriteFuncWrapper(SDL_RWops* context, const void *ptr, size_t size, size_t maxnum) { +size_t RWops::CustomWriteFuncWrapper(SDL_RWops* context, const void *ptr, size_t size, size_t num) { assert(context != nullptr); CustomRWops* custom_rwops = reinterpret_cast(context->hidden.unknown.data1); assert(custom_rwops != nullptr); - return custom_rwops->Write(ptr, size, maxnum); + return custom_rwops->Write(ptr, size, num); } int RWops::CustomCloseFuncWrapper(SDL_RWops* context) { diff --git a/SDL2pp/RWops.hh b/SDL2pp/RWops.hh index b7fddb5..f913d77 100644 --- a/SDL2pp/RWops.hh +++ b/SDL2pp/RWops.hh @@ -85,14 +85,14 @@ public: /// /// \param ptr Pointer to a buffer containing data to write /// \param size Size of each object to write, in bytes - /// \param maxnum Maximum number of objects to be write + /// \param num Maximum number of objects to be write /// /// \returns Number of objects written, which will be less than num on error /// /// \see http://wiki.libsdl.org/SDL_RWwrite /// //////////////////////////////////////////////////////////// - virtual size_t Write(const void* ptr, size_t size, size_t maxnum) = 0; + virtual size_t Write(const void* ptr, size_t size, size_t num) = 0; //////////////////////////////////////////////////////////// /// \brief Close data source