diff options
-rw-r--r-- | src/client/map.cc | 3 | ||||
-rw-r--r-- | src/render/image.cc | 2 | ||||
-rw-r--r-- | src/render/jpgfile.cc | 6 | ||||
-rw-r--r-- | src/ui/widget.cc | 4 |
4 files changed, 11 insertions, 4 deletions
diff --git a/src/client/map.cc b/src/client/map.cc index 4613ab7..7d1536d 100644 --- a/src/client/map.cc +++ b/src/client/map.cc @@ -186,4 +186,5 @@ bool Map::on_keypress(const int key, const unsigned int modifier) return false; } -}
\ No newline at end of file + +} diff --git a/src/render/image.cc b/src/render/image.cc index e740d56..196eec9 100644 --- a/src/render/image.cc +++ b/src/render/image.cc @@ -62,7 +62,7 @@ void Image::pad() for (size_t y =0; y < h; y++) { memcpy((void *)&image_new[y * image_width * image_channels], - (void *)image_data[y * w * image_channels], (size_t) w); + (void *)&image_data[y * w * image_channels], (size_t) w); } free(image_data); diff --git a/src/render/jpgfile.cc b/src/render/jpgfile.cc index 872233f..7713a07 100644 --- a/src/render/jpgfile.cc +++ b/src/render/jpgfile.cc @@ -18,6 +18,12 @@ http://www.zarb.org/~gc/html/libpng.html #include "render/jpgfile.h" #include "sys/sys.h" +// work around for the win32 build +#ifdef _WIN32 +#ifdef HAVE_STDLIB_H +#undef HAVE_STDLIB_H +#endif +#endif extern "C" { #include "jpeglib.h" } diff --git a/src/ui/widget.cc b/src/ui/widget.cc index 1270997..a7c667e 100644 --- a/src/ui/widget.cc +++ b/src/ui/widget.cc @@ -255,7 +255,7 @@ Widget *Widget::find_input_focus() if (!visible() || !widget_focus) return 0; - for (Children::const_reverse_iterator rit = widget_children.rbegin(); rit != widget_children.rend(); ++rit) { + for (Children::reverse_iterator rit = widget_children.rbegin(); rit != widget_children.rend(); ++rit) { Widget *w = (*rit); if (w->visible() && w->widget_focus) { Widget *f = w->find_input_focus(); @@ -275,7 +275,7 @@ Widget *Widget::find_mouse_focus(const math::Vector2f & pos) return 0; // reverse-iterate children - for (Children::const_reverse_iterator rit = widget_children.rbegin(); rit != widget_children.rend(); ++rit) { + for (Children::reverse_iterator rit = widget_children.rbegin(); rit != widget_children.rend(); ++rit) { Widget *w = (*rit); if (w->visible()) { Widget *f = w->find_mouse_focus(pos - w->location()); |