From f9d95172c44cfe8c87339d7b3594a3ca4aa86d89 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Thu, 26 Jan 2017 07:28:13 +0100 Subject: [PATCH] Adjust indentation of launcher storage --- src/anbox/application/launcher_storage.cpp | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/anbox/application/launcher_storage.cpp b/src/anbox/application/launcher_storage.cpp index 988281a2..9aab3759 100644 --- a/src/anbox/application/launcher_storage.cpp +++ b/src/anbox/application/launcher_storage.cpp @@ -71,18 +71,18 @@ void LauncherStorage::add(const Item &item) { exec += utils::string_format("--component=%s ", item.launch_intent.component); - std::ofstream f(item_path.string()); - f << "[Desktop Entry]" << std::endl - << "Name=" << item.package << std::endl - << "Exec=" << exec << std::endl - << "Terminal=false" << std::endl - << "Type=Application" << std::endl - << "Icon=" << item_icon_path.string() << std::endl; - f.close(); - - f = std::ofstream(item_icon_path.string()); - f.write(item.icon.data(), item.icon.size()); - f.close(); + std::ofstream desktop_item(item_path.string()); + desktop_item << "[Desktop Entry]" << std::endl + << "Name=" << item.package << std::endl + << "Exec=" << exec << std::endl + << "Terminal=false" << std::endl + << "Type=Application" << std::endl + << "Icon=" << item_icon_path.string() << std::endl; + desktop_item.close(); + + std::ofstream icon(item_icon_path.string()); + icon.write(item.icon.data(), item.icon.size()); + icon.close(); } } // namespace application } // namespace anbox -- GitLab