diff options
| author | Johannes Schickel | 2011-05-29 21:12:42 +0200 | 
|---|---|---|
| committer | Johannes Schickel | 2011-05-29 21:12:42 +0200 | 
| commit | 263adb5cfcd485a99ad869ed702586202e8bc7b6 (patch) | |
| tree | de64a00372ed8ecad13553776332587a4a659054 /common | |
| parent | 1ea96002b88c5d65a5f6b1e093c83d48a3c6cbbb (diff) | |
| download | scummvm-rg350-263adb5cfcd485a99ad869ed702586202e8bc7b6.tar.gz scummvm-rg350-263adb5cfcd485a99ad869ed702586202e8bc7b6.tar.bz2 scummvm-rg350-263adb5cfcd485a99ad869ed702586202e8bc7b6.zip  | |
COMMON: Limit pragma warning use in algorithm.h to MSVC.
Since we only want to disable a MSVC specific warning with it and other
compilers might have different warnings numbers it is safer to only target
MSVC here.
Diffstat (limited to 'common')
| -rw-r--r-- | common/algorithm.h | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/common/algorithm.h b/common/algorithm.h index fa9d08b380..00c0e1c98f 100644 --- a/common/algorithm.h +++ b/common/algorithm.h @@ -236,8 +236,10 @@ void sort(T first, T last) {  // MSVC is complaining about the minus operator being applied to an unsigned type  // We disable this warning for the affected section of code +#if defined(_MSC_VER)  #pragma warning(push)  #pragma warning(disable: 4146) +#endif  /**   * Euclid's algorithm to compute the greatest common divisor. @@ -261,7 +263,9 @@ T gcd(T a, T b) {  	return b;  } +#if defined(_MSC_VER)  #pragma warning(pop) +#endif  } // End of namespace Common  #endif  | 
