summaryrefslogtreecommitdiff
path: root/tools/inc
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-04-11 00:21:40 -0300
committerDavid Tardon <dtardon@redhat.com>2013-04-20 11:09:54 +0000
commit0f200cc30ea75fdce59f7bb6ae87ebc85729e2a4 (patch)
tree2e2c28f9500f81825cdadcbabd131da767ddbb49 /tools/inc
parent5414a3eecdb09be928313477792acfe1d3534645 (diff)
fdo#63154: Change Min/Max/Abs for std::min/max/abs
Now all these usages were removed from LO. Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6 Reviewed-on: https://gerrit.libreoffice.org/3326 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'tools/inc')
-rw-r--r--tools/inc/tools/gen.hxx12
-rw-r--r--tools/inc/tools/solar.h15
2 files changed, 6 insertions, 21 deletions
diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx
index 028d5043f845..19d10bd96af5 100644
--- a/tools/inc/tools/gen.hxx
+++ b/tools/inc/tools/gen.hxx
@@ -498,8 +498,8 @@ inline Point Rectangle::TopCenter() const
if ( IsEmpty() )
return Point( nLeft, nTop );
else
- return Point( Min( nLeft, nRight ) + Abs( (nRight - nLeft)/2 ),
- Min( nTop, nBottom) );
+ return Point( std::min( nLeft, nRight ) + std::abs( (nRight - nLeft)/2 ),
+ std::min( nTop, nBottom) );
}
inline Point Rectangle::BottomCenter() const
@@ -507,8 +507,8 @@ inline Point Rectangle::BottomCenter() const
if ( IsEmpty() )
return Point( nLeft, nTop );
else
- return Point( Min( nLeft, nRight ) + Abs( (nRight - nLeft)/2 ),
- Max( nTop, nBottom) );
+ return Point( std::min( nLeft, nRight ) + std::abs( (nRight - nLeft)/2 ),
+ std::max( nTop, nBottom) );
}
inline Point Rectangle::LeftCenter() const
@@ -516,7 +516,7 @@ inline Point Rectangle::LeftCenter() const
if ( IsEmpty() )
return Point( nLeft, nTop );
else
- return Point( Min( nLeft, nRight ), nTop + (nBottom - nTop)/2 );
+ return Point( std::min( nLeft, nRight ), nTop + (nBottom - nTop)/2 );
}
inline Point Rectangle::RightCenter() const
@@ -524,7 +524,7 @@ inline Point Rectangle::RightCenter() const
if ( IsEmpty() )
return Point( nLeft, nTop );
else
- return Point( Max( nLeft, nRight ), nTop + (nBottom - nTop)/2 );
+ return Point( std::max( nLeft, nRight ), nTop + (nBottom - nTop)/2 );
}
inline Point Rectangle::Center() const
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index ece2f8976ddf..58d5849c5f42 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -107,21 +107,6 @@ inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[7
#endif
#endif
-#ifndef __cplusplus
-#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-#endif
-
-#ifdef __cplusplus
-template<typename T> inline T Min(T a, T b) { return (a<b?a:b); }
-template<typename T> inline T Max(T a, T b) { return (a>b?a:b); }
-template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
-#endif
-
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else