summaryrefslogtreecommitdiffstats
path: root/ganv
diff options
context:
space:
mode:
Diffstat (limited to 'ganv')
-rw-r--r--ganv/Canvas.hpp2
-rw-r--r--ganv/Edge.hpp8
-rw-r--r--ganv/Item.hpp2
-rw-r--r--ganv/Node.hpp2
-rw-r--r--ganv/wrap.hpp4
5 files changed, 9 insertions, 9 deletions
diff --git a/ganv/Canvas.hpp b/ganv/Canvas.hpp
index d3b2281..1a11408 100644
--- a/ganv/Canvas.hpp
+++ b/ganv/Canvas.hpp
@@ -150,7 +150,7 @@ namespace Glib {
static inline Ganv::Canvas*
wrap(GanvCanvas* canvas)
{
- return (Ganv::Canvas*)ganv_canvas_get_wrapper(canvas);
+ return static_cast<Ganv::Canvas*>(ganv_canvas_get_wrapper(canvas));
}
} // namespace Glib
diff --git a/ganv/Edge.hpp b/ganv/Edge.hpp
index 5c60711..eb723e5 100644
--- a/ganv/Edge.hpp
+++ b/ganv/Edge.hpp
@@ -48,8 +48,8 @@ public:
tail->gobj(),
head->gobj(),
"color", color,
- "curved", (gboolean)curved,
- "arrowhead", (gboolean)show_arrowhead,
+ "curved", static_cast<gboolean>(curved),
+ "arrowhead", static_cast<gboolean>(show_arrowhead),
NULL)))
{}
@@ -77,8 +77,8 @@ public:
METHODRETWRAP0(ganv_edge, Node*, get_tail)
METHODRETWRAP0(ganv_edge, Node*, get_head)
- GanvEdge* gobj() { return (GanvEdge*)_gobj; }
- const GanvEdge* gobj() const { return (GanvEdge*)_gobj; }
+ GanvEdge* gobj() { return reinterpret_cast<GanvEdge*>(_gobj); }
+ const GanvEdge* gobj() const { return reinterpret_cast<GanvEdge*>(_gobj); }
private:
Edge(const Edge& copy);
diff --git a/ganv/Item.hpp b/ganv/Item.hpp
index 1d090d3..ebeb865 100644
--- a/ganv/Item.hpp
+++ b/ganv/Item.hpp
@@ -81,7 +81,7 @@ private:
GdkEvent* ev,
void* item)
{
- return ((Item*)item)->signal_event().emit(ev);
+ return static_cast<Item*>(item)->signal_event().emit(ev);
}
};
diff --git a/ganv/Node.hpp b/ganv/Node.hpp
index 2dd9dbc..f83ac8f 100644
--- a/ganv/Node.hpp
+++ b/ganv/Node.hpp
@@ -97,7 +97,7 @@ private:
gpointer signal) {
gboolean value;
g_object_get(gobj, g_param_spec_get_name(pspec), &value, NULL);
- ((sigc::signal<bool, gboolean>*)signal)->emit(value);
+ static_cast<sigc::signal<bool, gboolean>*>(signal)->emit(value);
}
};
diff --git a/ganv/wrap.hpp b/ganv/wrap.hpp
index 4affe83..6e331df 100644
--- a/ganv/wrap.hpp
+++ b/ganv/wrap.hpp
@@ -115,7 +115,7 @@ private: \
wrap(Ganv##Name* gobj) \
{ \
if (gobj) { \
- return (Ganv::Name*)ganv_item_get_wrapper(GANV_ITEM(gobj)); \
+ return static_cast<Ganv::Name*>(ganv_item_get_wrapper(GANV_ITEM(gobj))); \
} else { \
return NULL; \
} \
@@ -125,7 +125,7 @@ private: \
wrap(const Ganv##Name* gobj) \
{ \
if (gobj) { \
- return (const Ganv::Name*)ganv_item_get_wrapper(GANV_ITEM(gobj)); \
+ return static_cast<const Ganv::Name*>(ganv_item_get_wrapper(GANV_ITEM(gobj))); \
} else { \
return NULL; \
} \