mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
Eliminate -Wmissing-field-initializers
warnings.
This commit is contained in:
parent
a0da10b408
commit
41669ab720
@ -137,7 +137,7 @@ script:
|
||||
# Build hyperrogue.
|
||||
if [[ "$TRAVIS_BUILD_SYSTEM" == "autotools" ]]; then
|
||||
autoreconf -vi
|
||||
./configure CXXFLAGS="-Wall -Werror -Wno-unknown-warning-option -Wno-maybe-uninitialized"
|
||||
./configure CXXFLAGS="-W -Wall -Wextra -Werror -Wno-unknown-warning-option -Wno-unused-parameter -Wno-maybe-uninitialized"
|
||||
make
|
||||
elif [[ "$TRAVIS_BUILD_SYSTEM" == "Makefile" ]]; then
|
||||
make -f Makefile.simple CXX="${HYPERROGUE_CXX-g++}"
|
||||
|
@ -82,13 +82,13 @@ endif
|
||||
ifeq (${TOOLCHAIN},clang)
|
||||
CXXFLAGS_EARLY += -std=c++11 -march=native
|
||||
CXXFLAGS_EARLY += -W -Wall -Wextra -Werror -pedantic
|
||||
CXXFLAGS_EARLY += -Wno-unknown-warning-option -Wno-format-pedantic -Wno-missing-field-initializers -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized
|
||||
CXXFLAGS_EARLY += -Wno-unknown-warning-option -Wno-format-pedantic -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized
|
||||
endif
|
||||
|
||||
ifeq (${TOOLCHAIN},gcc)
|
||||
CXXFLAGS_EARLY += -std=c++11 -march=native
|
||||
CXXFLAGS_EARLY += -W -Wall -Wextra -Werror
|
||||
CXXFLAGS_EARLY += -Wno-unknown-warning-option -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized
|
||||
CXXFLAGS_EARLY += -Wno-unknown-warning-option -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized
|
||||
endif
|
||||
|
||||
ifeq (${TOOLCHAIN},mingw)
|
||||
|
64
classes.cpp
64
classes.cpp
@ -971,43 +971,45 @@ enum eModel : int {
|
||||
// (other bits are used for other information)
|
||||
|
||||
#define X3(x) x, x, x
|
||||
#define DEFAULTS 0, 0, 0, 0, 0, nullptr
|
||||
|
||||
/** list of available models (i.e., projections) */
|
||||
EX vector<modelinfo> mdinf = {
|
||||
{"disk/Gans", "general perspective", "general perspective", mf::azimuthal | mf::conformal},
|
||||
{"half-plane", "inversion", "half-plane", mf::conformal},
|
||||
{"band", "band", "Mercator", mf::band | mf::conformal},
|
||||
{X3("polygonal"), mf::conformal},
|
||||
{X3("formula"), 0},
|
||||
{X3("azimuthal equidistant"), mf::azimuthal | mf::equidistant | mf::euc_boring},
|
||||
{X3("azimuthal equi-area"), mf::azimuthal | mf::equiarea | mf::euc_boring},
|
||||
{X3("ball model"), mf::conformal | mf::azimuthal | mf::space},
|
||||
{"Minkowski hyperboloid", "plane", "sphere", mf::conformal | mf::space | mf::euc_boring},
|
||||
{"hemisphere", "sphere", "sphere", mf::conformal | mf::space},
|
||||
{X3("band equidistant"), mf::band | mf::equidistant | mf::euc_boring},
|
||||
{X3("band equi-area"), mf::band | mf::equiarea | mf::euc_boring},
|
||||
{X3("sinusoidal"), mf::pseudoband | mf::equiarea | mf::euc_boring},
|
||||
{X3("two-point equidistant"), mf::equidistant | mf::euc_boring | mf::twopoint},
|
||||
{X3("fisheye"), 0},
|
||||
{X3("Joukowsky transform"), mf::hyper_only | mf::conformal},
|
||||
{X3("Joukowsky+inversion"), mf::hyper_only | mf::conformal},
|
||||
{X3("rotated hyperboles"), mf::hyper_only},
|
||||
{X3("spiral/ring"), mf::hyper_or_torus | mf::uses_bandshift},
|
||||
{X3("native perspective"), 0},
|
||||
{X3("azimuthal equi-volume"), mf::azimuthal | mf::equivolume | mf::euc_boring},
|
||||
{X3("central inversion"), mf::azimuthal | mf::conformal},
|
||||
{X3("two-point azimuthal"), mf::euc_boring | mf::twopoint},
|
||||
{X3("two-point hybrid"), mf::euc_boring | mf::twopoint},
|
||||
{X3("geodesic"), 0},
|
||||
{X3("Mollweide"), mf::euc_boring | mf::pseudoband | mf::equiarea },
|
||||
{X3("central cylindrical"), mf::euc_boring | mf::band },
|
||||
{X3("Collignon"), mf::pseudoband | mf::equiarea },
|
||||
{X3("horocyclic coordinates"), mf::euc_boring },
|
||||
{X3("guard"), 0},
|
||||
{X3("polynomial"), mf::conformal}
|
||||
{"disk/Gans", "general perspective", "general perspective", mf::azimuthal | mf::conformal, DEFAULTS},
|
||||
{"half-plane", "inversion", "half-plane", mf::conformal, DEFAULTS},
|
||||
{"band", "band", "Mercator", mf::band | mf::conformal, DEFAULTS},
|
||||
{X3("polygonal"), mf::conformal, DEFAULTS},
|
||||
{X3("formula"), 0, DEFAULTS},
|
||||
{X3("azimuthal equidistant"), mf::azimuthal | mf::equidistant | mf::euc_boring, DEFAULTS},
|
||||
{X3("azimuthal equi-area"), mf::azimuthal | mf::equiarea | mf::euc_boring, DEFAULTS},
|
||||
{X3("ball model"), mf::conformal | mf::azimuthal | mf::space, DEFAULTS},
|
||||
{"Minkowski hyperboloid", "plane", "sphere", mf::conformal | mf::space | mf::euc_boring, DEFAULTS},
|
||||
{"hemisphere", "sphere", "sphere", mf::conformal | mf::space, DEFAULTS},
|
||||
{X3("band equidistant"), mf::band | mf::equidistant | mf::euc_boring, DEFAULTS},
|
||||
{X3("band equi-area"), mf::band | mf::equiarea | mf::euc_boring, DEFAULTS},
|
||||
{X3("sinusoidal"), mf::pseudoband | mf::equiarea | mf::euc_boring, DEFAULTS},
|
||||
{X3("two-point equidistant"), mf::equidistant | mf::euc_boring | mf::twopoint, DEFAULTS},
|
||||
{X3("fisheye"), 0, DEFAULTS},
|
||||
{X3("Joukowsky transform"), mf::hyper_only | mf::conformal, DEFAULTS},
|
||||
{X3("Joukowsky+inversion"), mf::hyper_only | mf::conformal, DEFAULTS},
|
||||
{X3("rotated hyperboles"), mf::hyper_only, DEFAULTS},
|
||||
{X3("spiral/ring"), mf::hyper_or_torus | mf::uses_bandshift, DEFAULTS},
|
||||
{X3("native perspective"), 0, DEFAULTS},
|
||||
{X3("azimuthal equi-volume"), mf::azimuthal | mf::equivolume | mf::euc_boring, DEFAULTS},
|
||||
{X3("central inversion"), mf::azimuthal | mf::conformal, DEFAULTS},
|
||||
{X3("two-point azimuthal"), mf::euc_boring | mf::twopoint, DEFAULTS},
|
||||
{X3("two-point hybrid"), mf::euc_boring | mf::twopoint, DEFAULTS},
|
||||
{X3("geodesic"), 0, DEFAULTS},
|
||||
{X3("Mollweide"), mf::euc_boring | mf::pseudoband | mf::equiarea, DEFAULTS},
|
||||
{X3("central cylindrical"), mf::euc_boring | mf::band, DEFAULTS},
|
||||
{X3("Collignon"), mf::pseudoband | mf::equiarea, DEFAULTS},
|
||||
{X3("horocyclic coordinates"), mf::euc_boring, DEFAULTS},
|
||||
{X3("guard"), 0, DEFAULTS},
|
||||
{X3("polynomial"), mf::conformal, DEFAULTS},
|
||||
};
|
||||
|
||||
#undef X3
|
||||
#undef DEFAULTS
|
||||
|
||||
#if HDR
|
||||
static inline bool orbProtection(eItem it) { return false; } // not implemented
|
||||
|
@ -25,7 +25,7 @@ string preprocessor =
|
||||
"g++ -E";
|
||||
|
||||
string compiler =
|
||||
"g++ -Wall -Wextra -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Wno-implicit-fallthrough -rdynamic -fdiagnostics-color=always -c";
|
||||
"g++ -Wall -Wextra -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-implicit-fallthrough -rdynamic -fdiagnostics-color=always -c";
|
||||
|
||||
string linker =
|
||||
"g++ -rdynamic -o hyper";
|
||||
|
@ -151,9 +151,7 @@ void recursive_paint(cwpath& pinv, vector<int>& way, int noway) {
|
||||
else
|
||||
gid = 3;
|
||||
|
||||
infos[c] = cellinfo{c, gid, 0};
|
||||
infos[c].way = way;
|
||||
infos[c].pinv = pinv;
|
||||
infos[c] = cellinfo{c, gid, 0, waNone, itNone, laNone, moNone, way, pinv};
|
||||
|
||||
// c->landparam ^= ((isize(way)&1) * 0x3F3F3F);
|
||||
// c->landparam = hsh; // d * 5 + 256 * (hsh&0xFFFF) + 0x400000;
|
||||
|
@ -41,7 +41,7 @@ extern "C"
|
||||
SDL_Surface *SDL_PNGFormatAlpha(SDL_Surface *src)
|
||||
{
|
||||
SDL_Surface *surf;
|
||||
SDL_Rect rect = { 0 };
|
||||
SDL_Rect rect = { 0, 0, 0, 0 };
|
||||
|
||||
/* NO-OP for images < 32bpp and 32bpp images that already have Alpha channel */
|
||||
if (src->format->BitsPerPixel <= 24 || src->format->Amask) {
|
||||
|
Loading…
Reference in New Issue
Block a user