From 29cda3b1ac62d532abc424a8787f7ade7ccf90e1 Mon Sep 17 00:00:00 2001 From: Alexis Lopez Zubieta Date: Sun, 4 Nov 2018 18:11:40 -0600 Subject: [PATCH] Change return type to bool --- src/linuxdeploy.cpp | 10 +++++----- src/linuxdeploy.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/linuxdeploy.cpp b/src/linuxdeploy.cpp index 5a3bdef..246bbe9 100644 --- a/src/linuxdeploy.cpp +++ b/src/linuxdeploy.cpp @@ -17,8 +17,8 @@ namespace linuxdeploy { desktopfile::DesktopFile getMainDesktopFile(std::vector& desktopFilePaths, std::vector& deployedDesktopFiles); - int deployAppDirRootFiles(std::vector desktopFilePaths, - std::string customAppRunPath, appdir::AppDir& appDir) { + bool deployAppDirRootFiles(std::vector desktopFilePaths, + std::string customAppRunPath, appdir::AppDir& appDir) { // search for desktop file and deploy it to AppDir root ldLog() << std::endl << "-- Deploying files into AppDir root directory --" << std::endl; @@ -28,13 +28,13 @@ namespace linuxdeploy { desktopfile::DesktopFile desktopFile = getMainDesktopFile(desktopFilePaths, deployedDesktopFiles); ldLog() << "Deploying desktop file:" << desktopFile.path() << std::endl; if (!appDir.createLinksInAppDirRoot(desktopFile, customAppRunPath)) - return -1; + return false; } catch (const std::runtime_error& er) { - return -1; + return false; } - return 1; + return true; } desktopfile::DesktopFile getMainDesktopFile(std::vector& desktopFilePaths, diff --git a/src/linuxdeploy.h b/src/linuxdeploy.h index 433b918..3581138 100644 --- a/src/linuxdeploy.h +++ b/src/linuxdeploy.h @@ -8,7 +8,7 @@ #include namespace linuxdeploy { - int deployAppDirRootFiles(std::vector desktopFilePaths, - std::string customAppRunPath, - linuxdeploy::core::appdir::AppDir& appDir); + bool deployAppDirRootFiles(std::vector desktopFilePaths, + std::string customAppRunPath, + linuxdeploy::core::appdir::AppDir& appDir); }