From e080389709a33681977d2feb35e7cf4221d752a3 Mon Sep 17 00:00:00 2001 From: kiritow <1362050620@qq.com> Date: Sun, 2 Jul 2017 08:43:25 +0800 Subject: [PATCH] Fix Compile Error and warning --- SDLWrapper/SharedLibrary.h | 1 + SDLWrapper/_caster.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/SDLWrapper/SharedLibrary.h b/SDLWrapper/SharedLibrary.h index 8b7b620..5438e41 100644 --- a/SDLWrapper/SharedLibrary.h +++ b/SDLWrapper/SharedLibrary.h @@ -2,6 +2,7 @@ #include "include.h" #include #include +#include #include "begin_code.h" class SharedLibrary { diff --git a/SDLWrapper/_caster.cpp b/SDLWrapper/_caster.cpp index dfa1194..7fdbd1b 100644 --- a/SDLWrapper/_caster.cpp +++ b/SDLWrapper/_caster.cpp @@ -236,6 +236,8 @@ Uint32 getUint32FromSDLInitFlag(SDLInitFlag flag) return SDL_INIT_EVENTS; case SDLInitFlag::All: return SDL_INIT_EVERYTHING; + default: + return 0; /// Return 0 by default. (Fix warning) } } @@ -254,6 +256,8 @@ int getIntFromIMGInitFlag(IMGInitFlag flag) return IMG_INIT_WEBP; case IMGInitFlag::ALL: return ( IMG_INIT_JPG | IMG_INIT_PNG | IMG_INIT_TIF | IMG_INIT_WEBP ); + default: + return 0; /// Return 0 by default. (Fix warning) } } @@ -273,6 +277,8 @@ int getIntFromMixInitFlag(MixInitFlag flag) return MIX_INIT_OGG; case MixInitFlag::FLUIDSYNTH: return MIX_INIT_FLUIDSYNTH; + default: + return 0; /// Return 0 by default. (Fix warning) } }