diff options
author | Pedro Giffuni <pfg@apache.org> | 2011-11-22 02:50:53 +0000 |
---|---|---|
committer | Pedro Giffuni <pfg@apache.org> | 2011-11-22 02:50:53 +0000 |
commit | 65d79d61a3d2714bfff5b0e9bbf745b95cd0a6c9 (patch) | |
tree | 0f2f678237c7ad2de8399fc4343e87fbc6e88e62 | |
parent | 5a16c1cd4c14b2bd6ec5858a674b63617a9ca274 (diff) |
agg: fix some warnings.
-rwxr-xr-x | agg/inc/agg_basics.h | 2 | ||||
-rwxr-xr-x | agg/inc/agg_clip_liang_barsky.h | 2 | ||||
-rwxr-xr-x | agg/inc/agg_conv_curve.h | 8 | ||||
-rwxr-xr-x | agg/inc/agg_line_aa_basics.h | 4 | ||||
-rwxr-xr-x | agg/inc/agg_renderer_outline_aa.h | 18 | ||||
-rwxr-xr-x | agg/source/agg_vcgen_contour.cpp | 2 | ||||
-rwxr-xr-x | agg/source/agg_vcgen_stroke.cpp | 4 |
7 files changed, 20 insertions, 20 deletions
diff --git a/agg/inc/agg_basics.h b/agg/inc/agg_basics.h index a87050c85dbc..6196272ea135 100755 --- a/agg/inc/agg_basics.h +++ b/agg/inc/agg_basics.h @@ -416,7 +416,7 @@ namespace agg inline bool is_close(unsigned c) { return (c & ~(path_flags_cw | path_flags_ccw)) == - (path_cmd_end_poly | path_flags_close); + ((bool)path_cmd_end_poly | (bool)path_flags_close); } //------------------------------------------------------------is_next_poly diff --git a/agg/inc/agg_clip_liang_barsky.h b/agg/inc/agg_clip_liang_barsky.h index 28765a79cd09..9ec70494acbe 100755 --- a/agg/inc/agg_clip_liang_barsky.h +++ b/agg/inc/agg_clip_liang_barsky.h @@ -80,7 +80,7 @@ namespace agg //-------------------------------------------------------clip_liang_barsky template<class T> - inline unsigned clip_liang_barsky(T x1, T y1, T x2, T y2, + /*inline*/ unsigned clip_liang_barsky(T x1, T y1, T x2, T y2, const rect_base<T>& clip_box, T* x, T* y) { diff --git a/agg/inc/agg_conv_curve.h b/agg/inc/agg_conv_curve.h index d90401054ed8..eb70f9ff8766 100755 --- a/agg/inc/agg_conv_curve.h +++ b/agg/inc/agg_conv_curve.h @@ -154,10 +154,10 @@ namespace agg return path_cmd_line_to; } - double ct2_x; - double ct2_y; - double end_x; - double end_y; + double ct2_x = 0; + double ct2_y = 0; + double end_x = 0; + double end_y = 0; unsigned cmd = m_source->vertex(x, y); switch(cmd) diff --git a/agg/inc/agg_line_aa_basics.h b/agg/inc/agg_line_aa_basics.h index d5c4feb36967..e3cd7480ceac 100755 --- a/agg/inc/agg_line_aa_basics.h +++ b/agg/inc/agg_line_aa_basics.h @@ -44,13 +44,13 @@ namespace agg //------------------------------------------------------------------line_mr AGG_INLINE int line_mr(int x) { - return x >> (line_subpixel_shift - line_mr_subpixel_shift); + return x >> ((int)line_subpixel_shift - (int)line_mr_subpixel_shift); } //-------------------------------------------------------------------line_hr AGG_INLINE int line_hr(int x) { - return x << (line_subpixel_shift - line_mr_subpixel_shift); + return x << ((int)line_subpixel_shift - (int)line_mr_subpixel_shift); } //---------------------------------------------------------------line_dbl_hr diff --git a/agg/inc/agg_renderer_outline_aa.h b/agg/inc/agg_renderer_outline_aa.h index d42ebcb049cd..2220b5dd834c 100755 --- a/agg/inc/agg_renderer_outline_aa.h +++ b/agg/inc/agg_renderer_outline_aa.h @@ -1365,7 +1365,7 @@ namespace agg //--------------------------------------------------------------------- void profile(const line_profile_aa& prof) { m_profile = &prof; } const line_profile_aa& profile() const { return *m_profile; } - line_profile_aa& profile() { return *m_profile; } + line_profile_aa& profile() { return const_cast<line_profile_aa&>(*m_profile); } //--------------------------------------------------------------------- int subpixel_width() const { return m_profile->subpixel_width(); } @@ -1562,11 +1562,11 @@ namespace agg { if(li.vertical()) { - while(li.step_ver()); + while(li.step_ver()) ; } else { - while(li.step_hor()); + while(li.step_hor()) ; } } } @@ -1617,11 +1617,11 @@ namespace agg line_interpolator_aa1<self_type> li(*this, lp, sx, sy); if(li.vertical()) { - while(li.step_ver()); + while(li.step_ver()) ; } else { - while(li.step_hor()); + while(li.step_hor()) ; } } @@ -1685,11 +1685,11 @@ namespace agg line_interpolator_aa2<self_type> li(*this, lp, ex, ey); if(li.vertical()) { - while(li.step_ver()); + while(li.step_ver()) ; } else { - while(li.step_hor()); + while(li.step_hor()) ; } } @@ -1756,11 +1756,11 @@ namespace agg line_interpolator_aa3<self_type> li(*this, lp, sx, sy, ex, ey); if(li.vertical()) { - while(li.step_ver()); + while(li.step_ver()) ; } else { - while(li.step_hor()); + while(li.step_hor()) ; } } diff --git a/agg/source/agg_vcgen_contour.cpp b/agg/source/agg_vcgen_contour.cpp index 44760fb17e00..eb724369171e 100755 --- a/agg/source/agg_vcgen_contour.cpp +++ b/agg/source/agg_vcgen_contour.cpp @@ -153,7 +153,7 @@ namespace agg case end_poly: if(!m_closed) return path_cmd_stop; m_status = stop; - return path_cmd_end_poly | path_flags_close | path_flags_ccw; + return (unsigned)path_cmd_end_poly | (unsigned)path_flags_close | (unsigned)path_flags_ccw; case stop: return path_cmd_stop; diff --git a/agg/source/agg_vcgen_stroke.cpp b/agg/source/agg_vcgen_stroke.cpp index e607272aecbb..f81d89ca2012 100755 --- a/agg/source/agg_vcgen_stroke.cpp +++ b/agg/source/agg_vcgen_stroke.cpp @@ -196,11 +196,11 @@ namespace agg case end_poly1: m_status = m_prev_status; - return path_cmd_end_poly | path_flags_close | path_flags_ccw; + return (unsigned)path_cmd_end_poly | (unsigned)path_flags_close | (unsigned)path_flags_ccw; case end_poly2: m_status = m_prev_status; - return path_cmd_end_poly | path_flags_close | path_flags_cw; + return (unsigned)path_cmd_end_poly | (unsigned)path_flags_close | (unsigned)path_flags_cw; case stop: cmd = path_cmd_stop; |