[Libreoffice-commits] core.git: unoidl/source

Stephan Bergmann sbergman at redhat.com
Fri Mar 1 15:01:43 PST 2013


 unoidl/source/reg2unoidl.cxx |   37 ++++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 17 deletions(-)

New commits:
commit 97b3bf8b03afef45565821d5e17bffa5d8e90474
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Mar 2 00:01:08 2013 +0100

    Don't use local types as template arguments (C++11 only feature)
    
    Change-Id: I19b7105b62464234cb72de701b07176f951a7951

diff --git a/unoidl/source/reg2unoidl.cxx b/unoidl/source/reg2unoidl.cxx
index b0a013d..c73909a 100644
--- a/unoidl/source/reg2unoidl.cxx
+++ b/unoidl/source/reg2unoidl.cxx
@@ -246,19 +246,31 @@ void writeKind(
     write8(file, v);
 }
 
+struct Item {
+    explicit Item(rtl::Reference< unoidl::Entity > const & theEntity):
+        entity(theEntity)
+    {}
+
+    rtl::Reference< unoidl::Entity > entity;
+    sal_uInt64 nameOffset;
+    sal_uInt64 dataOffset;
+};
+
+struct ConstItem {
+    explicit ConstItem(unoidl::ConstantValue const & theConstant):
+        constant(theConstant)
+    {}
+
+    unoidl::ConstantValue constant;
+    sal_uInt64 nameOffset;
+    sal_uInt64 dataOffset;
+};
+
 sal_uInt64 writeMap(
     osl::File & file, rtl::Reference< unoidl::MapCursor > const & cursor,
     std::size_t * rootSize)
 {
     assert(cursor.is());
-    struct Item {
-        explicit Item(rtl::Reference< unoidl::Entity > const & theEntity):
-            entity(theEntity)
-        {}
-        rtl::Reference< unoidl::Entity > entity;
-        sal_uInt64 nameOffset;
-        sal_uInt64 dataOffset;
-    };
     std::map< OUString, Item > map;
     for (;;) {
         OUString name;
@@ -468,15 +480,6 @@ sal_uInt64 writeMap(
                 rtl::Reference< unoidl::ConstantGroupEntity > ent2(
                     static_cast< unoidl::ConstantGroupEntity * >(
                         i->second.entity.get()));
-                struct ConstItem {
-                    explicit ConstItem(
-                        unoidl::ConstantValue const & theConstant):
-                        constant(theConstant)
-                    {}
-                    unoidl::ConstantValue constant;
-                    sal_uInt64 nameOffset;
-                    sal_uInt64 dataOffset;
-                };
                 std::map< OUString, ConstItem > cmap;
                 for (std::vector< unoidl::ConstantGroupEntity::Member >::
                          const_iterator j(ent2->getMembers().begin());


More information about the Libreoffice-commits mailing list