From ae9abd6be3e556d0a202cc5ab05668da715382c9 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 3 Oct 2013 10:24:53 +0300 Subject: [PATCH] Minor fixes, courtesy of Apple's compiler It likes to complain about a lot of things. Some of them make sense (like unused private members), but mostly it's just being a bitch. --- demos/desertpillars.cpp | 4 ++-- source/font.cpp | 10 +++++----- source/grid.h | 2 -- source/programdata.h | 2 +- source/scene.h | 1 + source/uniformblock.h | 2 +- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/demos/desertpillars.cpp b/demos/desertpillars.cpp index 373297e2..297619c7 100644 --- a/demos/desertpillars.cpp +++ b/demos/desertpillars.cpp @@ -262,7 +262,7 @@ const char DesertPillars::cube_transform_src[] = const float DesertPillars::cube_shapes[] = { -0.4, 0.5, 1.0, 0.3 }; -DesertPillars::Options::Options(const Graphics::Display &display, int argc, char **argv) +DesertPillars::Options::Options(const Graphics::Display &dpy, int argc, char **argv) { GetOpt getopt; getopt.add_option('f', "fullscreen", window_opts.fullscreen, GetOpt::NO_ARG).set_help("Run in fullscreen mode"); @@ -270,7 +270,7 @@ DesertPillars::Options::Options(const Graphics::Display &display, int argc, char if(window_opts.fullscreen) { - const Graphics::VideoMode &mode = display.get_desktop_mode(); + const Graphics::VideoMode &mode = dpy.get_desktop_mode(); window_opts.width = mode.width; window_opts.height = mode.height; } diff --git a/source/font.cpp b/source/font.cpp index 069ecf0f..1639f4a3 100644 --- a/source/font.cpp +++ b/source/font.cpp @@ -182,12 +182,12 @@ Font::Glyph::Loader::Loader(Glyph &g): add("advance", &Glyph::advance); } -void Font::Glyph::Loader::texcoords(float x1, float y1, float x2, float y2) +void Font::Glyph::Loader::texcoords(float x1_, float y1_, float x2_, float y2_) { - obj.x1 = x1; - obj.y1 = y1; - obj.x2 = x2; - obj.y2 = y2; + obj.x1 = x1_; + obj.y1 = y1_; + obj.x2 = x2_; + obj.y2 = y2_; } } // namespace GL diff --git a/source/grid.h b/source/grid.h index 6d65df0a..ed22ce7d 100644 --- a/source/grid.h +++ b/source/grid.h @@ -17,8 +17,6 @@ private: Vector3 binorm; unsigned u_div; unsigned v_div; - float u_origin; - float y_origin; public: GridBuilder(float, float, unsigned = 4, unsigned = 4); diff --git a/source/programdata.h b/source/programdata.h index e27265d7..f51ad788 100644 --- a/source/programdata.h +++ b/source/programdata.h @@ -10,10 +10,10 @@ namespace Msp { namespace GL { class Buffer; -class Color; class Matrix; class Uniform; class UniformBlock; +struct Color; /** Stores uniform variables for shader programs. The uniforms are stored in a diff --git a/source/scene.h b/source/scene.h index fbc57a80..10b1ab65 100644 --- a/source/scene.h +++ b/source/scene.h @@ -1,6 +1,7 @@ #ifndef MSP_GL_SCENE_H_ #define MSP_GL_SCENE_H_ +#include #include "renderable.h" namespace Msp { diff --git a/source/uniformblock.h b/source/uniformblock.h index d694e367..192e7c2e 100644 --- a/source/uniformblock.h +++ b/source/uniformblock.h @@ -11,9 +11,9 @@ namespace Msp { namespace GL { class BufferRange; -class Color; class Matrix; class Uniform; +struct Color; /** Stores uniforms with a specific layout. Both named and default uniform blocks -- 2.43.0