projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No-op: remove all trailing whitespace.
[dcpomatic.git]
/
src
/
lib
/
rect.h
diff --git
a/src/lib/rect.h
b/src/lib/rect.h
index 1feb8ad4fed460d19a9f83439e21bdd0abcc1ea0..97b90abc5e28546ab74d6c0fa1115460289a0dbb 100644
(file)
--- a/
src/lib/rect.h
+++ b/
src/lib/rect.h
@@
-21,20
+21,21
@@
#define DCPOMATIC_RECT_H
#include "position.h"
#define DCPOMATIC_RECT_H
#include "position.h"
+#include <algorithm>
/* Put this inside a namespace as Apple put a Rect in the global namespace */
namespace dcpomatic
{
/* Put this inside a namespace as Apple put a Rect in the global namespace */
namespace dcpomatic
{
-
+
/** @struct Rect
* @brief A rectangle.
*/
/** @struct Rect
* @brief A rectangle.
*/
-template <class T>
+template <class T>
class Rect
{
public:
class Rect
{
public:
-
+
Rect ()
: x (0)
, y (0)
Rect ()
: x (0)
, y (0)
@@
-70,7
+71,7
@@
public:
{
T const tx = max (x, other.x);
T const ty = max (y, other.y);
{
T const tx = max (x, other.x);
T const ty = max (y, other.y);
-
+
return Rect (
tx, ty,
min (x + width, other.x + other.width) - tx,
return Rect (
tx, ty,
min (x + width, other.x + other.width) - tx,