From c04a27e21e3cf0b40d47defc59c2f6db349ddf4f Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 15 Oct 2011 14:16:29 -0700 Subject: [PATCH] Removed STL dependency in Android code. --- src/core/android/SDL_android.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.cpp index 08bb2d667..774ab4039 100644 --- a/src/core/android/SDL_android.cpp +++ b/src/core/android/SDL_android.cpp @@ -23,8 +23,6 @@ #include "SDL_android.h" -#include - extern "C" { #include "../../events/SDL_events_c.h" #include "../../video/android/SDL_androidkeyboard.h" @@ -521,8 +519,11 @@ extern "C" long Android_JNI_FileSeek(SDL_RWops* ctx, long offset, int whence) // The easy case where we're seeking forwards while (movement > 0) { - size_t result = Android_JNI_FileRead(ctx, buffer, 1, - std::min(movement, (long)sizeof(buffer))); + long amount = (long) sizeof (buffer); + if (amount > movement) { + amount = movement; + } + size_t result = Android_JNI_FileRead(ctx, buffer, 1, amount); if (result <= 0) { // Failed to read/skip the required amount, so fail