[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] [pingus] 3 new revisions pushed by address@hidden on 2014-0
From: |
pingus |
Subject: |
[Pingus-CVS] [pingus] 3 new revisions pushed by address@hidden on 2014-07-26 18:49 GMT |
Date: |
Sat, 26 Jul 2014 18:50:04 +0000 |
master moved from d96869e3b2f6 to e418b8ce075d
3 new revisions:
Revision: 5af25985ea47
Author: Ingo Ruhnke <address@hidden>
Date: Sat Jul 26 18:31:09 2014 UTC
Log: Fixed compiler warning in tinygettext
http://code.google.com/p/pingus/source/detail?r=5af25985ea47
Revision: fef8cf6512fa
Author: Ingo Ruhnke <address@hidden>
Date: Sat Jul 26 18:49:11 2014 UTC
Log: Switched to boost::signals2
http://code.google.com/p/pingus/source/detail?r=fef8cf6512fa
Revision: e418b8ce075d
Author: Ingo Ruhnke <address@hidden>
Date: Sat Jul 26 18:49:29 2014 UTC
Log: Fixed some -Werror=conversion issues
http://code.google.com/p/pingus/source/detail?r=e418b8ce075d
==============================================================================
Revision: 5af25985ea47
Author: Ingo Ruhnke <address@hidden>
Date: Sat Jul 26 18:31:09 2014 UTC
Log: Fixed compiler warning in tinygettext
http://code.google.com/p/pingus/source/detail?r=5af25985ea47
Modified:
/external/tinygettext/tinygettext/po_parser.cpp
=======================================
--- /external/tinygettext/tinygettext/po_parser.cpp Tue Aug 30 22:11:13
2011 UTC
+++ /external/tinygettext/tinygettext/po_parser.cpp Sat Jul 26 18:31:09
2014 UTC
@@ -209,7 +209,7 @@
if (pedantic)
warning("leading whitespace before string");
- get_string_line(out, i);
+ get_string_line(out, static_cast<unsigned int>(i));
goto next;
}
else if (isspace(current_line[i]))
==============================================================================
Revision: fef8cf6512fa
Author: Ingo Ruhnke <address@hidden>
Date: Sat Jul 26 18:49:11 2014 UTC
Log: Switched to boost::signals2
http://code.google.com/p/pingus/source/detail?r=fef8cf6512fa
Modified:
/SConscript
/src/editor/button.hpp
/src/editor/checkbox.hpp
/src/editor/combobox.hpp
/src/editor/file_list.hpp
/src/editor/inputbox.hpp
/src/editor/message_box.hpp
/src/editor/object_selector.cpp
/src/editor/viewport.hpp
/src/pingus/components/check_box.hpp
/src/pingus/components/choice_box.hpp
/src/pingus/components/slider_box.hpp
/src/pingus/config_manager.hpp
/src/pingus/screens/option_menu.hpp
=======================================
--- /SConscript Sun Jan 15 19:45:07 2012 UTC
+++ /SConscript Sat Jul 26 18:49:11 2014 UTC
@@ -189,9 +189,8 @@
'src/engine/input/xinput/xinput_device.cpp'])
def configure_boost(self):
- if not
self.conf.CheckLibWithHeader('boost_signals', 'boost/signals.hpp', 'c++'):
- if not
self.conf.CheckLibWithHeader('boost_signals-mt', 'boost/signals.hpp', 'c++'):
- self.fatal_error += " * library 'boost_signals' not
found\n"
+ if not self.conf.CheckHeader('boost/signals2.hpp', '<>', 'c++'):
+ self.fatal_error += " * library 'boost_signals2' not found\n"
def configure_png(self):
if self.conf.CheckMyProgram('pkg-config'):
=======================================
--- /src/editor/button.hpp Sat Sep 24 23:10:32 2011 UTC
+++ /src/editor/button.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_EDITOR_BUTTON_HPP
#define HEADER_PINGUS_EDITOR_BUTTON_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "engine/gui/rect_component.hpp"
@@ -48,7 +48,7 @@
void enable() { enabled = true; }
void disable() { enabled = false; }
- boost::signal<void()> on_click;
+ boost::signals2::signal<void()> on_click;
private:
Button (const Button&);
=======================================
--- /src/editor/checkbox.hpp Fri Nov 6 20:26:48 2009 UTC
+++ /src/editor/checkbox.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_EDITOR_CHECKBOX_HPP
#define HEADER_PINGUS_EDITOR_CHECKBOX_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "engine/gui/rect_component.hpp"
@@ -40,7 +40,7 @@
bool is_checked() const { return checked; }
void on_primary_button_press(int x, int y);
- boost::signal<void (bool)> on_change;
+ boost::signals2::signal<void (bool)> on_change;
private:
Checkbox (const Checkbox&);
=======================================
--- /src/editor/combobox.hpp Sat Nov 7 04:23:49 2009 UTC
+++ /src/editor/combobox.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -18,7 +18,7 @@
#ifndef HEADER_PINGUS_EDITOR_COMBOBOX_HPP
#define HEADER_PINGUS_EDITOR_COMBOBOX_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "engine/display/sprite.hpp"
#include "engine/gui/rect_component.hpp"
@@ -89,7 +89,7 @@
void update_layout() {}
- boost::signal<void (const ComboItem&)> on_select;
+ boost::signals2::signal<void (const ComboItem&)> on_select;
private:
Combobox();
=======================================
--- /src/editor/file_list.hpp Fri Sep 16 17:55:20 2011 UTC
+++ /src/editor/file_list.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_EDITOR_FILE_LIST_HPP
#define HEADER_PINGUS_EDITOR_FILE_LIST_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "engine/display/sprite.hpp"
#include "engine/gui/rect_component.hpp"
@@ -61,7 +61,7 @@
bool has_more_next_pages();
bool has_more_prev_pages();
- boost::signal<void (const System::DirectoryEntry&)> on_click;
+ boost::signals2::signal<void (const System::DirectoryEntry&)> on_click;
private:
int items_per_page();
=======================================
--- /src/editor/inputbox.hpp Wed Sep 7 11:51:48 2011 UTC
+++ /src/editor/inputbox.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_EDITOR_INPUTBOX_HPP
#define HEADER_PINGUS_EDITOR_INPUTBOX_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "engine/gui/rect_component.hpp"
@@ -40,8 +40,8 @@
void update_layout() {}
- boost::signal<void (const std::string&)> on_change;
- boost::signal<void (const std::string&)> on_enter;
+ boost::signals2::signal<void (const std::string&)> on_change;
+ boost::signals2::signal<void (const std::string&)> on_enter;
private:
Inputbox (const Inputbox&);
=======================================
--- /src/editor/message_box.hpp Sat Sep 24 23:11:03 2011 UTC
+++ /src/editor/message_box.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -45,7 +45,7 @@
void on_cancel_button();
public:
- boost::signal<void()> on_ok;
+ boost::signals2::signal<void()> on_ok;
private:
MessageBox(const MessageBox&);
=======================================
--- /src/editor/object_selector.cpp Tue Oct 11 15:42:27 2011 UTC
+++ /src/editor/object_selector.cpp Sat Jul 26 18:49:11 2014 UTC
@@ -16,7 +16,7 @@
#include "editor/object_selector.hpp"
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "editor/generic_level_obj.hpp"
#include "editor/gui_style.hpp"
@@ -47,7 +47,7 @@
std::string tooltip;
public:
- boost::signal<void()> on_click;
+ boost::signals2::signal<void()> on_click;
public:
ObjectSelectorButton(ObjectSelectorList* object_list_,
=======================================
--- /src/editor/viewport.hpp Mon Sep 12 20:41:30 2011 UTC
+++ /src/editor/viewport.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -18,7 +18,7 @@
#ifndef HEADER_PINGUS_EDITOR_VIEWPORT_HPP
#define HEADER_PINGUS_EDITOR_VIEWPORT_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include <set>
#include "editor/selection.hpp"
@@ -148,7 +148,7 @@
void clear_selection();
- boost::signal<void (const Selection&)> selection_changed;
+ boost::signals2::signal<void (const Selection&)> selection_changed;
private:
Viewport();
Viewport (const Viewport&);
=======================================
--- /src/pingus/components/check_box.hpp Sun Oct 2 15:02:42 2011 UTC
+++ /src/pingus/components/check_box.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_PINGUS_COMPONENTS_CHECK_BOX_HPP
#define HEADER_PINGUS_PINGUS_COMPONENTS_CHECK_BOX_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "engine/display/sprite.hpp"
#include "engine/gui/rect_component.hpp"
@@ -39,7 +39,7 @@
void set_state(bool v, bool send_signal);
- boost::signal<void (bool)> on_change;
+ boost::signals2::signal<void (bool)> on_change;
private:
CheckBox (const CheckBox&);
=======================================
--- /src/pingus/components/choice_box.hpp Sat Nov 7 11:35:45 2009 UTC
+++ /src/pingus/components/choice_box.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_PINGUS_COMPONENTS_CHOICE_BOX_HPP
#define HEADER_PINGUS_PINGUS_COMPONENTS_CHOICE_BOX_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "engine/gui/rect_component.hpp"
@@ -36,7 +36,7 @@
void add_choice(const std::string& str);
void set_current_choice(int choice);
- boost::signal<void (std::string)> on_change;
+ boost::signals2::signal<void (std::string)> on_change;
private:
ChoiceBox (const ChoiceBox&);
=======================================
--- /src/pingus/components/slider_box.hpp Sun Oct 2 15:02:26 2011 UTC
+++ /src/pingus/components/slider_box.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_PINGUS_COMPONENTS_SLIDER_BOX_HPP
#define HEADER_PINGUS_PINGUS_COMPONENTS_SLIDER_BOX_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "engine/gui/rect_component.hpp"
@@ -39,7 +39,7 @@
void set_value(int v);
- boost::signal<void (int)> on_change;
+ boost::signals2::signal<void (int)> on_change;
private:
SliderBox (const SliderBox&);
=======================================
--- /src/pingus/config_manager.hpp Fri Oct 14 02:03:23 2011 UTC
+++ /src/pingus/config_manager.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_PINGUS_CONFIG_MANAGER_HPP
#define HEADER_PINGUS_PINGUS_CONFIG_MANAGER_HPP
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "math/size.hpp"
#include "pingus/options.hpp"
@@ -39,55 +39,55 @@
void set_master_volume(int);
int get_master_volume() const;
- boost::signal<void(int)> on_master_volume_change;
+ boost::signals2::signal<void(int)> on_master_volume_change;
void set_sound_volume(int);
int get_sound_volume() const;
- boost::signal<void(int)> on_sound_volume_change;
+ boost::signals2::signal<void(int)> on_sound_volume_change;
void set_music_volume(int);
int get_music_volume() const;
- boost::signal<void(int)> on_music_volume_change;
+ boost::signals2::signal<void(int)> on_music_volume_change;
void set_fullscreen_resolution(const Size& size);
Size get_fullscreen_resolution() const;
- boost::signal<void(Size)> on_fullscreen_resolution_change;
+ boost::signals2::signal<void(Size)> on_fullscreen_resolution_change;
void set_fullscreen(bool);
bool get_fullscreen() const;
- boost::signal<void(bool)> on_fullscreen_change;
+ boost::signals2::signal<void(bool)> on_fullscreen_change;
void set_renderer(FramebufferType type);
FramebufferType get_renderer() const;
- boost::signal<void(FramebufferType)> on_renderer_change;
+ boost::signals2::signal<void(FramebufferType)> on_renderer_change;
void set_resizable(bool);
bool get_resizable() const;
- boost::signal<void(bool)> on_resizable_change;
+ boost::signals2::signal<void(bool)> on_resizable_change;
void set_mouse_grab(bool);
bool get_mouse_grab() const;
- boost::signal<void(bool)> on_mouse_grab_change;
+ boost::signals2::signal<void(bool)> on_mouse_grab_change;
void set_print_fps(bool);
bool get_print_fps() const;
- boost::signal<void(bool)> on_print_fps_change;
+ boost::signals2::signal<void(bool)> on_print_fps_change;
void set_language(const tinygettext::Language&);
tinygettext::Language get_language() const;
- boost::signal<void(const tinygettext::Language&)> on_language_change;
+ boost::signals2::signal<void(const tinygettext::Language&)>
on_language_change;
void set_software_cursor(bool);
bool get_software_cursor() const;
- boost::signal<void(bool)> on_software_cursor_change;
+ boost::signals2::signal<void(bool)> on_software_cursor_change;
void set_auto_scrolling(bool);
bool get_auto_scrolling() const;
- boost::signal<void(bool)> on_auto_scrolling_change;
+ boost::signals2::signal<void(bool)> on_auto_scrolling_change;
void set_drag_drop_scrolling(bool);
bool get_drag_drop_scrolling() const;
- boost::signal<void(bool)> on_drag_drop_scrolling_change;
+ boost::signals2::signal<void(bool)> on_drag_drop_scrolling_change;
private:
ConfigManager (const ConfigManager&);
=======================================
--- /src/pingus/screens/option_menu.hpp Mon Oct 3 14:05:05 2011 UTC
+++ /src/pingus/screens/option_menu.hpp Sat Jul 26 18:49:11 2014 UTC
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_PINGUS_SCREENS_OPTION_MENU_HPP
#define HEADER_PINGUS_PINGUS_SCREENS_OPTION_MENU_HPP
-#include <boost/signals.hpp>
+#include <boost/signals2.hpp>
#include <map>
#include <vector>
@@ -66,7 +66,7 @@
//Label* defaults_label;
//CheckBox* defaults_box;
- typedef std::vector<boost::signals::connection> Connections;
+ typedef std::vector<boost::signals2::connection> Connections;
Connections connections;
tinygettext::Language m_language;
==============================================================================
Revision: e418b8ce075d
Author: Ingo Ruhnke <address@hidden>
Date: Sat Jul 26 18:49:29 2014 UTC
Log: Fixed some -Werror=conversion issues
http://code.google.com/p/pingus/source/detail?r=e418b8ce075d
Modified:
/src/editor/combobox.cpp
/src/editor/file_list.cpp
/src/editor/object_selector_list.cpp
/src/editor/object_selector_set.cpp
/src/engine/display/font.cpp
/src/engine/display/sdl_framebuffer.cpp
/src/engine/input/controller.cpp
/src/engine/input/evdev/evdev_device.cpp
/src/pingus/components/button_panel.cpp
/src/pingus/components/choice_box.cpp
/src/pingus/levelset.cpp
/src/pingus/screens/option_menu.cpp
/src/util/memory_pool.hpp
/src/util/system.cpp
=======================================
--- /src/editor/combobox.cpp Fri Sep 2 14:59:43 2011 UTC
+++ /src/editor/combobox.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -60,7 +60,7 @@
{
if (drop_down)
return Rect(Vector2i(rect.left, rect.top + get_box_offset()),
- Size(rect.get_width(), rect.get_height() *
(item_list.size()))).contains(Vector2i(x,y));
+ Size(rect.get_width(), rect.get_height() *
static_cast<int>(item_list.size()))).contains(Vector2i(x,y));
else
return RectComponent::is_at(x,y);
}
@@ -88,7 +88,7 @@
list_rect = Rect(Vector2i(rect.left,
rect.top + get_box_offset()),
Size(rect.get_width(),
- rect.get_height() * item_list.size()));
+ rect.get_height() *
static_cast<int>(item_list.size())));
on_pointer_move(x,y);
}
=======================================
--- /src/editor/file_list.cpp Wed Sep 28 17:50:57 2011 UTC
+++ /src/editor/file_list.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -45,7 +45,7 @@
hspace = rect.get_width()/2;
vspace = 20;
- num_pages = directory.size() / items_per_page();
+ num_pages = static_cast<int>(directory.size()) / items_per_page();
if ((directory.size() % items_per_page()) != 0 || num_pages == 0)
num_pages += 1;
@@ -90,7 +90,7 @@
directory.push_back(System::DirectoryEntry("..", System::DE_DIRECTORY));
std::sort(directory.begin(), directory.end(), DirectorySorter());
- num_pages = directory.size() / items_per_page();
+ num_pages = static_cast<int>(directory.size()) / items_per_page();
if ((directory.size() % items_per_page()) != 0 || num_pages == 0)
num_pages += 1;
@@ -104,7 +104,7 @@
int end = (page+1) * items_per_page();
if (end > int(directory.size()))
- end = directory.size();
+ end = static_cast<int>(directory.size());
int x = rect.left;
int y = rect.top;
=======================================
--- /src/editor/object_selector_list.cpp Fri Sep 16 17:55:39 2011 UTC
+++ /src/editor/object_selector_list.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -59,8 +59,8 @@
for(Objects::const_iterator i = set->get_objects().begin(); i !=
set->get_objects().end(); ++i)
{
- int x = (i - set->get_objects().begin()) % 5;
- int y = (i - set->get_objects().begin()) / 5;
+ int x = static_cast<int>(i - set->get_objects().begin()) % 5;
+ int y = static_cast<int>(i - set->get_objects().begin()) / 5;
gc.draw((*i)->thumbnail, Vector2i(x * 48, y * 48));
@@ -180,7 +180,8 @@
mouse_pos = Vector2i(x - rect.left, y - rect.top);
int width = 5;
- int height = (set->get_objects().size() / width) +
((set->get_objects().size() % width > 0) ? 1 : 0);
+ int height = (static_cast<int>(set->get_objects().size()) / width) +
+ ((static_cast<int>(set->get_objects().size()) % width > 0) ? 1 : 0);
if (mode != OBJECT_DRAG)
{
@@ -220,7 +221,8 @@
// FIXME: move this to a separate function
int width = 5;
- int height = (set->get_objects().size() / width) +
((set->get_objects().size() % width > 0) ? 1 : 0);
+ int height = (static_cast<int>(set->get_objects().size()) / width) +
+ ((static_cast<int>(set->get_objects().size()) % width > 0) ? 1 : 0);
offset = Math::clamp(Math::min(static_cast<float>(rect.get_height()) -
(static_cast<float>(height) * 48.0f),
0.0f), offset, 0.0f);
}
=======================================
--- /src/editor/object_selector_set.cpp Fri Nov 6 19:43:20 2009 UTC
+++ /src/editor/object_selector_set.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -47,7 +47,7 @@
int
ObjectSelectorSet::get_height() const
{
- return (objects.size() / get_width()) + ((objects.size() % get_width() >
0) ? 1 : 0);
+ return (static_cast<int>(objects.size()) / get_width()) +
((static_cast<int>(objects.size()) % get_width() > 0) ? 1 : 0);
}
} // namespace Editor
=======================================
--- /src/engine/display/font.cpp Fri May 10 02:22:34 2013 UTC
+++ /src/engine/display/font.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -67,7 +67,7 @@
if (glyphs[i->unicode] == 0)
{
glyphs[i->unicode] = new GlyphDescription(*i);
- glyphs[i->unicode]->image = framebuffer_surfaces.size()-1;
+ glyphs[i->unicode]->image =
static_cast<int>(framebuffer_surfaces.size()) - 1;
}
else
{
=======================================
--- /src/engine/display/sdl_framebuffer.cpp Tue Aug 7 21:45:03 2012 UTC
+++ /src/engine/display/sdl_framebuffer.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -70,7 +70,7 @@
dp1 = ((((dp1 - color) * alpha) >> 8) + color) & 0x00FF00FF;
dp2 = ((((dp2 - sp2) * alpha) >> 8) + sp2) & 0x00FF00FF;
- *p = (dp1 | (dp2 << 8));
+ *p = static_cast<Uint32>(dp1 | (dp2 << 8));
} else {
(static_cast<Uint32*>(screen->pixels))[x + y * screen->w] = color;
}
@@ -407,7 +407,7 @@
sdl_rects.push_back(sdl_rect);
}
- SDL_UpdateRects(screen, sdl_rects.size(),
const_cast<SDL_Rect*>(&*sdl_rects.begin()));
+ SDL_UpdateRects(screen, static_cast<int>(sdl_rects.size()),
const_cast<SDL_Rect*>(&*sdl_rects.begin()));
}
Size
=======================================
--- /src/engine/input/controller.cpp Tue Sep 20 22:44:32 2011 UTC
+++ /src/engine/input/controller.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -180,7 +180,7 @@
{
if (*i)
{
- add_axis_event(i - axes.begin(), (*i)->get_pos());
+ add_axis_event(static_cast<int>(i - axes.begin()), (*i)->get_pos());
}
}
@@ -188,7 +188,7 @@
{
if (*i)
{
- add_pointer_event(i - pointers.begin(), (*i)->get_pos().x,
(*i)->get_pos().y);
+ add_pointer_event(static_cast<int>(i - pointers.begin()),
(*i)->get_pos().x, (*i)->get_pos().y);
}
}
=======================================
--- /src/engine/input/evdev/evdev_device.cpp Mon Sep 5 21:46:01 2011 UTC
+++ /src/engine/input/evdev/evdev_device.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -192,7 +192,7 @@
{
for(std::vector<Relative>::size_type i = 0; i != relatives.size(); ++i)
if (relatives[i].code == code)
- return i;
+ return static_cast<int>(i);
return -1;
}
@@ -201,7 +201,7 @@
{
for(std::vector<Key>::size_type i = 0; i != keys.size(); ++i)
if (keys[i].code == code)
- return i;
+ return static_cast<int>(i);
return -1;
}
@@ -210,7 +210,7 @@
{
for(std::vector<Absolute>::size_type i = 0; i != absolutes.size(); ++i)
if (absolutes[i].code == code)
- return i;
+ return static_cast<int>(i);
return -1;
}
=======================================
--- /src/pingus/components/button_panel.cpp Wed Sep 28 16:41:01 2011 UTC
+++ /src/pingus/components/button_panel.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -38,8 +38,8 @@
std::vector<ActionName::Enum> actions = aholder->get_available_actions();
- set_rect(Rect(Vector2i(pos.x, pos.y - (actions.size() * 38)/2),
- Size(60, actions.size() * 38)));
+ set_rect(Rect(Vector2i(pos.x, pos.y - (static_cast<int>(actions.size())
* 38)/2),
+ Size(60, static_cast<int>(actions.size()) * 38)));
// Sort the action so that they always have the same order in the panel
std::sort(actions.begin(), actions.end());
@@ -67,11 +67,11 @@
for(std::vector<ActionButton>::size_type i = 0; i < buttons.size(); ++i)
{
if (current_button == i)
- gc.draw(highlight, Vector2i(rect.left, rect.top + 38*i));
+ gc.draw(highlight, Vector2i(rect.left, rect.top +
38*static_cast<int>(i)));
else
- gc.draw(background, Vector2i(rect.left, rect.top + 38*i));
+ gc.draw(background, Vector2i(rect.left, rect.top +
38*static_cast<int>(i)));
- gc.draw(buttons[i].sprite, Vector2i(rect.left + 20, rect.top + 38*i +
16));
+ gc.draw(buttons[i].sprite, Vector2i(rect.left + 20, rect.top +
38*static_cast<int>(i) + 16));
if (globals::developer_mode)
{
@@ -80,17 +80,17 @@
out << aholder->get_available(buttons[i].name)
<< " / "
<< aholder->get_used(buttons[i].name);
- gc.print_left(Fonts::pingus_small, Vector2i(rect.left + 46, rect.top
+ 5 + 38*i), out.str());
+ gc.print_left(Fonts::pingus_small, Vector2i(rect.left + 46, rect.top
+ 5 + 38*static_cast<int>(i)), out.str());
}
else
{
std::string str =
StringUtil::to_string(aholder->get_available(buttons[i].name));
- gc.print_center(Fonts::pingus_small, Vector2i(rect.left + 46,
rect.top + 5 + 38*i), str);
+ gc.print_center(Fonts::pingus_small, Vector2i(rect.left + 46,
rect.top + 5 + 38*static_cast<int>(i)), str);
}
if (show_tip && tip_button == i)
{
- gc.print_left(Fonts::pingus_small, Vector2i(rect.left + 65, rect.top
+ 5 + 38*i),
+ gc.print_left(Fonts::pingus_small, Vector2i(rect.left + 65, rect.top
+ 5 + 38*static_cast<int>(i)),
ActionName::to_screenname(buttons[i].name));
}
}
@@ -171,8 +171,8 @@
void
ButtonPanel::set_pos(const Vector2i& pos)
{
- set_rect(Rect(Vector2i(pos.x, pos.y - (buttons.size() * 38)/2),
- Size(60, buttons.size() * 38)));
+ set_rect(Rect(Vector2i(pos.x, pos.y - (static_cast<int>(buttons.size())
* 38)/2),
+ Size(60, static_cast<int>(buttons.size()) * 38)));
}
/* EOF */
=======================================
--- /src/pingus/components/choice_box.cpp Wed Sep 28 16:41:01 2011 UTC
+++ /src/pingus/components/choice_box.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -69,7 +69,7 @@
{
current_choice -= 1;
if (current_choice < 0)
- current_choice = choices.size()-1;
+ current_choice = static_cast<int>(choices.size()) - 1;
//current_choice = 0;
}
=======================================
--- /src/pingus/levelset.cpp Fri Dec 23 12:51:37 2011 UTC
+++ /src/pingus/levelset.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -220,7 +220,7 @@
int
Levelset::get_level_count() const
{
- return m_levels.size();
+ return static_cast<int>(m_levels.size());
}
int
=======================================
--- /src/pingus/screens/option_menu.cpp Sat Oct 22 20:53:42 2011 UTC
+++ /src/pingus/screens/option_menu.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -110,7 +110,7 @@
std::vector<Size> resolutions = Display::get_fullscreen_video_modes();
Size fullscreen = config_manager.get_fullscreen_resolution();
- int choice = resolutions.size()-1;
+ int choice = static_cast<int>(resolutions.size()) - 1;
for (auto it = resolutions.begin(); it != resolutions.end(); ++it)
{
// add resolution to the box
@@ -120,7 +120,7 @@
if (fullscreen == *it)
{
- choice = it - resolutions.begin();
+ choice = static_cast<int>(it - resolutions.begin());
}
}
@@ -164,7 +164,7 @@
if (m_language == *i)
{
- language_box->set_current_choice(i - langs.begin());
+ language_box->set_current_choice(static_cast<int>(i -
langs.begin()));
}
}
}
=======================================
--- /src/util/memory_pool.hpp Mon Sep 19 20:14:36 2011 UTC
+++ /src/util/memory_pool.hpp Sat Jul 26 18:49:29 2014 UTC
@@ -35,7 +35,7 @@
Chunks chunks;
size_t chunk_size;
- int next_free;
+ size_t next_free;
char* allocate(size_t size)
{
=======================================
--- /src/util/system.cpp Tue Aug 7 12:39:37 2012 UTC
+++ /src/util/system.cpp Sat Jul 26 18:49:29 2014 UTC
@@ -65,7 +65,7 @@
std::string
System::cut_file_extension(const std::string& filename)
{
- for(int i = filename.size()-1; i >= 0; --i)
+ for(int i = static_cast<int>(filename.size()) - 1; i >= 0; --i)
{
if (filename[i] == '.')
{
@@ -83,7 +83,7 @@
std::string
System::get_file_extension(const std::string& filename)
{
- for(int i = filename.size()-1; i >= 0; --i)
+ for(int i = static_cast<int>(filename.size()) - 1; i >= 0; --i)
{
if (filename[i] == '.')
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] [pingus] 3 new revisions pushed by address@hidden on 2014-07-26 18:49 GMT,
pingus <=