projects
/
geeqie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use references in pan_layout_compute() parameters
[geeqie.git]
/
src
/
pan-view
/
pan-item.cc
diff --git
a/src/pan-view/pan-item.cc
b/src/pan-view/pan-item.cc
index
bd94503
..
e81fad7
100644
(file)
--- a/
src/pan-view/pan-item.cc
+++ b/
src/pan-view/pan-item.cc
@@
-21,6
+21,7
@@
#include "pan-item.h"
#include "pan-item.h"
+#include <algorithm>
#include <cstring>
#include <glib-object.h>
#include <cstring>
#include <glib-object.h>
@@
-108,12
+109,12
@@
void pan_item_size_by_item(PanItem *pi, PanItem *child, gint border)
pi->height = child->y + child->height + border - pi->y;
}
pi->height = child->y + child->height + border - pi->y;
}
-void pan_item_size_coordinates(PanItem *pi, gint border, gint
*w, gint *
h)
+void pan_item_size_coordinates(PanItem *pi, gint border, gint
&w, gint &
h)
{
if (!pi) return;
{
if (!pi) return;
-
if (*w < pi->x + pi->width + border) *w = pi->x + pi->width + border
;
-
if (*h < pi->y + pi->height + border) *h = pi->y + pi->height + border
;
+
w = std::max(w, pi->x + pi->width + border)
;
+
h = std::max(h, pi->y + pi->height + border)
;
}
}