[Libreoffice-commits] .: desktop/source

Fridrich Strba fridrich at kemper.freedesktop.org
Sat Feb 12 05:14:33 PST 2011


 desktop/source/pkgchk/unopkg/unopkg_app.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 946926f41f9d38ed9b4d853383418e7038842927
Author: Steven Butler <sebutler at gmail.com>
Date:   Sat Feb 12 14:12:50 2011 +0100

    A correct solution for the std::fill_n

diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index e282abe..06c8f83 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -500,12 +500,9 @@ extern "C" int unopkg_main()
                 //Now prepare the vector which tells what extension has an
                 //unaccepted license
                 vecUnaccepted.resize(vecExtUnaccepted.size() + vec_packages.size());
-                ::std::vector<bool>::iterator i_unaccepted = vecUnaccepted.begin();
-                ::std::vector<bool>::size_type i = 0;
-                for (; i < vecExtUnaccepted.size(); i++)
-                    *i_unaccepted++ = true;
-                for (; i < vec_packages.size(); i++)
-                    *i_unaccepted++ = false;
+                ::std::fill_n(vecUnaccepted.begin(), vecExtUnaccepted.size(), true);
+                ::std::fill_n(vecUnaccepted.begin() + vecExtUnaccepted.size(),
+                      vec_packages.size(), false);
                 
                 dp_misc::writeConsole(
                     OUSTR("All deployed ") + repository + OUSTR(" extensions:\n\n"));


More information about the Libreoffice-commits mailing list