[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    [patch] Save 3 bytes per KoXmlWriter::Tag
From:       "=?utf-8?q?Jaros=C5=82aw_Staniek?=" <staniek () kde ! org>
Date:       2009-06-01 19:59:58
Message-ID: 200906012159.59068.jstaniek () kogmbh ! net
[Download RAW message or body]

Dear All,
For review, attached potential saver - 3 bytes per KoXmlWriter::Tag.

-- 
regards / pozdrawiam, Jaroslaw Staniek
 Kexi & KOffice (http://www.kexi-project.org, http://www.koffice.org)
 KDE Libraries for MS Windows (http://windows.kde.org)
 http://www.linkedin.com/in/jstaniek

["KoXmlWriter_Tag_booleans.patch" (text/x-patch)]

Index: libs/store/KoXmlWriter.h
===================================================================
--- libs/store/KoXmlWriter.h	(revision 975753)
+++ libs/store/KoXmlWriter.h	(working copy)
@@ -240,10 +240,10 @@
                 : tagName(t), hasChildren(false), lastChildIsText(false),
                 openingTagClosed(false), indentInside(ind) {}
         const char* tagName;
-        bool hasChildren; ///< element or text children
-        bool lastChildIsText; ///< last child is a text node
-        bool openingTagClosed; ///< true once the '\>' in \<tag a="b"\> is written out
-        bool indentInside; ///< whether to indent the contents of this tag
+        bool hasChildren : 1; ///< element or text children
+        bool lastChildIsText : 1; ///< last child is a text node
+        bool openingTagClosed : 1; ///< true once the '\>' in \<tag a="b"\> is written out
+        bool indentInside : 1; ///< whether to indent the contents of this tag
     };
 
     /// Write out \n followed by the number of spaces required.


_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic