[aseprite] 148/196: Minor format changes in app/app.cpp

Tobias Hansen thansen at moszumanska.debian.org
Wed Apr 20 18:50:14 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit e353a2f79d8cf13f4f6a9f6f1f10c8abb32ba94b
Author: David Capello <davidcapello at gmail.com>
Date:   Mon Apr 4 12:20:33 2016 -0300

    Minor format changes in app/app.cpp
---
 src/app/app.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/app/app.cpp b/src/app/app.cpp
index 869542e..279576b 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -506,10 +506,10 @@ void App::initialize(const AppOptions& options)
           // Shrink all sprites if needed
           for (auto doc : ctx->documents()) {
             ctx->setActiveDocument(static_cast<app::Document*>(doc));
-            scaleWidth = doc->width() > maxWidth ? maxWidth / doc->width() : 1.0;
-            scaleHeight = doc->height() > maxHeight ? maxHeight / doc->height() : 1.0;
+            scaleWidth = (doc->width() > maxWidth ? maxWidth / doc->width() : 1.0);
+            scaleHeight = (doc->height() > maxHeight ? maxHeight / doc->height() : 1.0);
             if (scaleWidth < 1.0 || scaleHeight < 1.0) {
-              scale = scaleWidth < scaleHeight ? scaleWidth : scaleHeight;
+              scale = MIN(scaleWidth, scaleHeight);
               Command* command = CommandsModule::instance()->getCommandByName(CommandId::SpriteSize);
               static_cast<SpriteSizeCommand*>(command)->setScale(scale, scale);
               ctx->executeCommand(command);
@@ -580,7 +580,8 @@ void App::initialize(const AppOptions& options)
             FrameTag* frameTag = nullptr;
             if (!frameTagName.empty()) {
               frameTag = doc->sprite()->frameTags().getByName(frameTagName);
-            } else if (!frameRange.empty()) {
+            }
+            else if (!frameRange.empty()) {
                 std::vector<std::string> splitRange;
                 base::split_string(frameRange, splitRange, ":");
                 frameTag = new FrameTag(base::convert_to<frame_t>(splitRange.at(0)),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list