From 24fdc52af5c3f190b27d6c5838dfa20c102da6c8 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 24 Dec 2013 15:30:35 +0100 Subject: [PATCH] CComponentsButton: reduce scope of variable face_x The scope of the variable 'face_x' can be reduced. (style) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9ac35f0d927c3996cfabe8eea71ef045ad395b1d Author: Thilo Graf Date: 2013-12-24 (Tue, 24 Dec 2013) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_button.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index 639cfe683..37ea6c3d7 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -136,14 +136,13 @@ void CComponentsButton::initCaption() //if we have an icon, we must calculate positions for booth items together //also the icon width and left position = 0 int face_w = 0; - int face_x = 0; //calculate width and left position of icon, if available, picture position is default centered if (cc_btn_icon_obj){ //if found a picture object, then get width from it... face_w = cc_btn_icon_obj->getWidth(); //...and set position as centered - face_x = width/2 - face_w/2; + int face_x = width/2 - face_w/2; cc_btn_icon_obj->setXPos(face_x); }