Page MenuHomeWildfire Games
Paste P205

Disable gcc warning introduced by rP23690
ActivePublic

Authored by Imarok on Fri, May 22, 10:42 PM.
Index: source/third_party/tinygettext/src/plural_forms.cpp
===================================================================
--- source/third_party/tinygettext/src/plural_forms.cpp (Revision 23690)
+++ source/third_party/tinygettext/src/plural_forms.cpp (Arbeitskopie)
@@ -57,7 +57,9 @@
unsigned int plural4_gd(int n) { return static_cast<unsigned int>(( n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3); }
unsigned int plural4_he(int n) { return static_cast<unsigned int>((n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3);}
unsigned int plural4_lt(int n) { return static_cast<unsigned int>(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);}
+#pragma GCC diagnostic ignored "-Wparentheses"
unsigned int plural4_pl(int n) { return static_cast<unsigned int>(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);}
+#pragma GCC diagnostic pop
unsigned int plural4_sk(int n) { return static_cast<unsigned int>(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);}
unsigned int plural4_uk(int n) { return static_cast<unsigned int>(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);}
unsigned int plural5_ga(int n) { return static_cast<unsigned int>(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);}

Event Timeline

Imarok edited the content of this paste. (Show Details)Fri, May 22, 10:42 PM
Imarok changed the title of this paste from untitled to Disable gcc warning introduced by rP23690.
Imarok updated the paste's language from autodetect to diff.
Imarok changed the visibility from "All Users" to "Public (No Login Required)".Fri, May 22, 10:42 PM
Imarok edited the content of this paste. (Show Details)