Skip to content

Commit d1c0d79

Browse files
committed
remove deprecated macros
1 parent bacfd17 commit d1c0d79

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
lines changed

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project('nip4', 'c',
22
# ie. a major after nip2 8.9 for workspace save file versioning
3-
version: '9.0.1-5',
3+
version: '9.0.2-2',
44
license: 'GPL',
55
meson_version: '>=0.64',
66
default_options: [

src/class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ class_get_member_int(PElement *instance, const char *name, int *out)
10661066
if (!class_get_member_check(instance, name, "real",
10671067
(ClassGetFn) heap_get_real, &d))
10681068
return FALSE;
1069-
*out = VIPS_RINT(d);
1069+
*out = rint(d);
10701070

10711071
return TRUE;
10721072
}

src/colour.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ colour_edit(GtkWidget *parent, Model *model)
270270
double rgb[3];
271271
colour_get_rgb(colour, rgb);
272272
GdkRGBA initial_color = {
273-
.red = VIPS_RINT(rgb[0] / 255.0),
274-
.green = VIPS_RINT(rgb[1] / 255.0),
275-
.blue = VIPS_RINT(rgb[2] / 255.0),
273+
.red = rint(rgb[0] / 255.0),
274+
.green = rint(rgb[1] / 255.0),
275+
.blue = rint(rgb[2] / 255.0),
276276
.alpha = 1.0
277277
};
278278

src/imageinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ imageinfo_set_rgb(Imageinfo *imageinfo, double rgb[3])
922922
*/
923923
VipsPel value8[3];
924924
for (int i = 0; i < 3; i++)
925-
value8[i] = VIPS_RINT(rgb[i]);
925+
value8[i] = rint(rgb[i]);
926926
vips_image_init_fields(in->image, 1, 1, 3,
927927
VIPS_FORMAT_UCHAR, VIPS_CODING_NONE,
928928
VIPS_INTERPRETATION_sRGB, 1.0, 1.0);

src/infobar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ infobar_status_update(Infobar *infobar)
278278
vips_buf_rewind(&buf);
279279

280280
double zoom = imagewindow_get_zoom(infobar->win);
281-
vips_buf_appendf(&buf, "Magnification %d%%", (int) VIPS_RINT(zoom * 100));
281+
vips_buf_appendf(&buf, "Magnification %d%%", (int) rint(zoom * 100));
282282
gtk_label_set_text(GTK_LABEL(infobar->mag), vips_buf_all(&buf));
283283

284284
// queue bg update of pixel value (this must be off the GUI thread)

src/plotwindow.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ plotwindow_motion(GtkEventControllerMotion *self,
132132
double data_x, data_y;
133133
if (plotdisplay_gtk_to_data(plotdisplay, x, y, &data_x, &data_y)) {
134134
Plot *plot = plotwindow->plot;
135-
int index = VIPS_RINT(data_x);
135+
int index = rint(data_x);
136136

137137
set_glabel(plotwindow->x, "%9.1f", data_x);
138138
set_glabel(plotwindow->y, "%9.1f", data_y);

src/workspaceview.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,13 @@ workspaceview_tick(GtkWidget *widget, GdkFrameClock *frame_clock,
162162
wview->row_shadow_elapsed += dt;
163163

164164
// 0-1 progress in animation
165-
double duration = wview->should_animate ? workspaceview_animation_duration : wview->row_shadow_elapsed;
166-
double t = VIPS_CLIP(0, ease_out_cubic(wview->row_shadow_elapsed / duration), 1);
165+
double duration = wview->should_animate ?
166+
workspaceview_animation_duration : wview->row_shadow_elapsed;
167+
double t = VIPS_CLIP(0,
168+
ease_out_cubic(wview->row_shadow_elapsed / duration), 1);
167169

168170
workspaceview_set_row_shadow_height(wview,
169-
VIPS_RINT(t * wview->max_row_shadow_height));
171+
rint(t * wview->max_row_shadow_height));
170172

171173
if (t != 1.0)
172174
finished = FALSE;
@@ -1106,8 +1108,8 @@ workspaceview_drag_update(GtkEventControllerMotion *self,
11061108

11071109
// don't let x/y go -ve (layout hates it)
11081110
columnview_animate_to(wview->drag_cview,
1109-
VIPS_CLIP(0, VIPS_RINT(obj_x), wview->width - w),
1110-
VIPS_CLIP(0, VIPS_RINT(obj_y), wview->height - h));
1111+
VIPS_CLIP(0, rint(obj_x), wview->width - w),
1112+
VIPS_CLIP(0, rint(obj_y), wview->height - h));
11111113

11121114
// top, since we want the titlebar to be visible
11131115
view_scrollto(VIEW(wview->drag_cview), MODEL_SCROLL_TOP);

0 commit comments

Comments
 (0)