summaryrefslogtreecommitdiff
path: root/shell/source/unix
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-06 09:26:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-06 09:59:59 +0100
commit202d9af5ab4291a8f867791293477a18ae48051d (patch)
treea0c40d2972c946c934c4550daafafef5bff815ea /shell/source/unix
parent329d0ad29d4cb48c099abffece0dd8a051011a4f (diff)
loplugin:flatten in shell
Change-Id: Id58f692168274a942d2b976f10885341dfe63ac3 Reviewed-on: https://gerrit.libreoffice.org/67434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'shell/source/unix')
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index d85861346f21..b2c2a419adf3 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -313,20 +313,20 @@ namespace /* private */ {
recently_used_file& file,
recently_used_item_list_t& item_list)
{
- if (!item_list.empty())
- {
- file.truncate();
- file.reset();
+ if (item_list.empty())
+ return;
- file.write(XML_HEADER, strlen(XML_HEADER));
+ file.truncate();
+ file.reset();
- std::for_each(
- item_list.begin(),
- item_list.end(),
- recent_item_writer(file));
+ file.write(XML_HEADER, strlen(XML_HEADER));
- file.write(XML_FOOTER, strlen(XML_FOOTER));
- }
+ std::for_each(
+ item_list.begin(),
+ item_list.end(),
+ recent_item_writer(file));
+
+ file.write(XML_FOOTER, strlen(XML_FOOTER));
}