Skip to content

Commit a7fdbc7

Browse files
committed
fix more compiler warnings
1 parent f777526 commit a7fdbc7

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

src/agg/include/agg/agg_image_filters.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace agg
6060
double x = double(i) / double(image_subpixel_scale);
6161
double y = filter.calc_weight(x);
6262
m_weight_array[pivot + i] =
63-
m_weight_array[pivot - i] = (int16)iround(y * image_filter_scale);
63+
m_weight_array[pivot - i] = (int16)iround(y * int(image_filter_scale));
6464
}
6565
unsigned end = (diameter() << image_subpixel_shift) - 1;
6666
m_weight_array[0] = m_weight_array[end];

src/agg/include/agg/agg_span_gradient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace agg
4949
enum downscale_shift_e
5050
{
5151
downscale_shift = interpolator_type::subpixel_shift -
52-
gradient_subpixel_shift
52+
int(gradient_subpixel_shift)
5353
};
5454

5555
//--------------------------------------------------------------------

src/agg/src/agg_arrowhead.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace agg
6666
m_cmd[3] = path_cmd_line_to;
6767
m_cmd[4] = path_cmd_line_to;
6868
m_cmd[5] = path_cmd_line_to;
69-
m_cmd[7] = path_cmd_end_poly | path_flags_close | path_flags_ccw;
69+
m_cmd[7] = unsigned(path_cmd_end_poly) | unsigned(path_flags_close) | unsigned(path_flags_ccw);
7070
m_cmd[6] = path_cmd_stop;
7171
return;
7272
}
@@ -87,7 +87,7 @@ namespace agg
8787
m_cmd[1] = path_cmd_line_to;
8888
m_cmd[2] = path_cmd_line_to;
8989
m_cmd[3] = path_cmd_line_to;
90-
m_cmd[4] = path_cmd_end_poly | path_flags_close | path_flags_ccw;
90+
m_cmd[4] = unsigned(path_cmd_end_poly) | unsigned(path_flags_close) | unsigned(path_flags_ccw);
9191
m_cmd[5] = path_cmd_stop;
9292
return;
9393
}

src/agg/src/agg_rounded_rect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ namespace agg
152152
else return path_cmd_line_to;
153153

154154
case 8:
155-
cmd = path_cmd_end_poly | path_flags_close | path_flags_ccw;
155+
cmd = unsigned(path_cmd_end_poly) | unsigned(path_flags_close) | unsigned(path_flags_ccw);
156156
m_status++;
157157
break;
158158
}

src/agg/src/agg_vcgen_contour.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ namespace agg
152152
case end_poly:
153153
if(!m_closed) return path_cmd_stop;
154154
m_status = stop;
155-
return path_cmd_end_poly | path_flags_close | path_flags_ccw;
155+
return unsigned(path_cmd_end_poly) | unsigned(path_flags_close) | unsigned(path_flags_ccw);
156156

157157
case stop:
158158
return path_cmd_stop;

src/agg/src/agg_vcgen_dash.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ namespace agg
257257
}else if(m_status == stop){ // if looped
258258
// this is the case when the whole closed path is covered by a single continuous dash,
259259
// so we need to close the dash-path
260-
cmd = path_cmd_end_poly | path_flags_close;
260+
cmd = unsigned(path_cmd_end_poly) | unsigned(path_flags_close);
261261
}
262262
return cmd;
263263
}

src/agg/src/agg_vcgen_stroke.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ namespace agg
195195

196196
case end_poly1:
197197
m_status = m_prev_status;
198-
return path_cmd_end_poly | path_flags_close | path_flags_ccw;
198+
return unsigned(path_cmd_end_poly) | unsigned(path_flags_close) | unsigned(path_flags_ccw);
199199

200200
case end_poly2:
201201
m_status = m_prev_status;
202-
return path_cmd_end_poly | path_flags_close | path_flags_cw;
202+
return unsigned(path_cmd_end_poly) | unsigned(path_flags_close) | unsigned(path_flags_cw);
203203

204204
case stop:
205205
cmd = path_cmd_stop;

0 commit comments

Comments
 (0)