diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-01 14:52:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-03 09:21:51 +0200 |
commit | 47cd34a60ff9048404075823e519f1abdd4b0e9a (patch) | |
tree | e9728dd7c686d23f90b4331f105d6f5f8c1176cd /include/tools | |
parent | c79dd92480cbc409a7061da7f3dd3abaaf9a4883 (diff) |
use more compact namespace syntax in /include
excluding the UDK headers of course
Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/color.hxx | 4 | ||||
-rw-r--r-- | include/tools/date.hxx | 2 | ||||
-rw-r--r-- | include/tools/gen.hxx | 4 | ||||
-rw-r--r-- | include/tools/link.hxx | 4 | ||||
-rw-r--r-- | include/tools/time.hxx | 2 | ||||
-rw-r--r-- | include/tools/urlobj.hxx | 6 |
6 files changed, 11 insertions, 11 deletions
diff --git a/include/tools/color.hxx b/include/tools/color.hxx index f66d49b51442..afdb30d9e02c 100644 --- a/include/tools/color.hxx +++ b/include/tools/color.hxx @@ -254,13 +254,13 @@ inline void operator <<=( css::uno::Any & rAny, Color value ) { rAny <<= sal_Int32(value); } -namespace com { namespace sun { namespace star { namespace uno { +namespace com::sun::star::uno { template<> inline Any makeAny( Color const & value ) { return Any(sal_Int32(value)); } -} } } } +} // Test compile time conversion of Color to sal_uInt32 diff --git a/include/tools/date.hxx b/include/tools/date.hxx index 0adbc2ea4b4f..cd69d16b10b6 100644 --- a/include/tools/date.hxx +++ b/include/tools/date.hxx @@ -25,7 +25,7 @@ #include <com/sun/star/util/Date.hpp> -namespace com { namespace sun { namespace star { namespace util { struct DateTime; } } } } +namespace com::sun::star::util { struct DateTime; } enum DayOfWeek { MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY }; diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx index 7365d60728a4..e069717bbd53 100644 --- a/include/tools/gen.hxx +++ b/include/tools/gen.hxx @@ -56,7 +56,7 @@ protected: long nB; }; -namespace tools { namespace detail { +namespace tools::detail { // Used to implement operator == for subclasses of Pair: inline bool equal(Pair const & p1, Pair const & p2) @@ -64,7 +64,7 @@ inline bool equal(Pair const & p1, Pair const & p2) return p1.A() == p2.A() && p1.B() == p2.B(); } -} } +} // Point diff --git a/include/tools/link.hxx b/include/tools/link.hxx index 6fea12fea984..ec88bf953352 100644 --- a/include/tools/link.hxx +++ b/include/tools/link.hxx @@ -154,7 +154,7 @@ private: // Class used to indicate that the Call() parameter is not in use: class LinkParamNone { LinkParamNone() = delete; }; -namespace tools { namespace detail { +namespace tools::detail { // Avoids loplugin:redundantcast in LINK macro, in the common case that Instance // is already of type Class * (instead of a derived type): @@ -173,7 +173,7 @@ Link<Arg, Ret> makeLink(void * instance, Ret (* function)(void *, Arg)) { } #endif -} } +} #endif diff --git a/include/tools/time.hxx b/include/tools/time.hxx index bada8bd5a2d0..414b28f72986 100644 --- a/include/tools/time.hxx +++ b/include/tools/time.hxx @@ -22,7 +22,7 @@ #include <tools/toolsdllapi.h> #include <com/sun/star/util/Time.hpp> -namespace com { namespace sun { namespace star { namespace util { struct DateTime; } } } } +namespace com::sun::star::util { struct DateTime; } /** @WARNING: This class can serve both as wall clock time and time duration, and diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index d8b812bb7a81..1fb5f4e86aea 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -30,11 +30,11 @@ class SvMemoryStream; -namespace com { namespace sun { namespace star { namespace util { +namespace com::sun::star::util { class XStringWidth; -} } } } +} -namespace com { namespace sun { namespace star { namespace uno { template <typename > class Reference; } } } } +namespace com::sun::star::uno { template <typename > class Reference; } // Common URL prefixes for various schemes: #define INET_FTP_SCHEME "ftp://" |