Coding style 54/90554/1
authorPiotr Ganicz <p.ganicz@samsung.com>
Fri, 30 Sep 2016 09:24:43 +0000 (11:24 +0200)
committerPiotr Ganicz <p.ganicz@samsung.com>
Fri, 30 Sep 2016 09:24:43 +0000 (11:24 +0200)
Change-Id: Ib507c02e3202cd96df63a1fddf8d51fa8cb7f163

src/wgt/step/configuration/step_parse.cc
src/wgt/step/encryption/step_encrypt_resources.cc
src/wgt/step/filesystem/step_wgt_patch_icons.cc

index c6bf723..c15d8af 100644 (file)
@@ -39,6 +39,7 @@
 #include <set>
 #include <string>
 #include <vector>
+#include <utility>
 
 #include "wgt/wgt_backend_data.h"
 
@@ -77,7 +78,8 @@ void AppendWidgetMetadata(GList** metadatas,
     const std::vector<std::pair<std::string, std::string>> metadata) {
   GList* list = *metadatas;
   for (auto& meta : metadata) {
-    metadata_x* new_meta = static_cast<metadata_x*>(calloc(1, sizeof(metadata_x)));
+    metadata_x* new_meta =
+        static_cast<metadata_x*>(calloc(1, sizeof(metadata_x)));
     new_meta->key = strdup(meta.first.c_str());
     if (!meta.second.empty())
       new_meta->value = strdup(meta.second.c_str());
index b2ec518..d7d2e9a 100644 (file)
@@ -23,7 +23,7 @@
 
 namespace {
 
-const std::size_t kEncryptionChunkMaxSize = 8_kB; // bytes
+const std::size_t kEncryptionChunkMaxSize = 8_kB;  // bytes
 const std::set<std::string> encryptSet { ".html", ".htm", ".css", ".js"};
 
 FILE* OpenFile(const std::string& path, const std::string& mode) {
@@ -191,7 +191,8 @@ bool StepEncryptResources::EncryptFile(const bf::path &src) {
       size_t encrypted_size = 0;
       // TODO(p.sikorski) check if it is Preloaded
       int ret;
-      if (context_->request_mode.get() == common_installer::RequestMode::GLOBAL) {
+      if (context_->request_mode.get()
+              == common_installer::RequestMode::GLOBAL) {
         ret = wae_encrypt_global_web_application(
                 context_->pkgid.get().c_str(),
                 context_->is_preload_request.get() ?
@@ -255,7 +256,6 @@ bool StepEncryptResources::EncryptFile(const bf::path &src) {
       free(encrypted_data);
     }
     inChunk.reset(new unsigned char[chunkSize]);
-
   } while (!std::feof(input));
 
   fclose(output);
index c01c1c8..ade10df 100644 (file)
@@ -60,7 +60,8 @@ common_installer::Step::Status StepWgtPatchIcons::process() {
       // create default icon if there is no icon at all
       bf::path icon_path = common_icon_location / app->appid;
       icon_path += ".png";
-      bf::copy_file(kDefaultIconPath, icon_path, bf::copy_option::overwrite_if_exists, error);
+      bf::copy_file(kDefaultIconPath, icon_path,
+              bf::copy_option::overwrite_if_exists, error);
       if (error) {
         LOG(ERROR) << "Failed to create default icon for web application";
         return Status::ICON_ERROR;