Whitespace cleanup
Change-Id: I93c65973679894bb8587da4b38b410d38036b8bd
diff --git a/gui/slidervalue.cpp b/gui/slidervalue.cpp
index 088620a..b53797b 100644
--- a/gui/slidervalue.cpp
+++ b/gui/slidervalue.cpp
@@ -62,7 +62,7 @@
}
mLabel = new GUIText(node);
- if(mLabel->Render() < 0)
+ if (mLabel->Render() < 0)
{
delete mLabel;
mLabel = NULL;
@@ -156,7 +156,7 @@
mFontHeight = mFont->GetHeight();
- if(mShowCurr)
+ if (mShowCurr)
{
int maxLen = std::max(strlen(mMinStr.c_str()), strlen(mMaxStr.c_str()));
mValueStr = new char[maxLen+1];
@@ -182,10 +182,10 @@
void GUISliderValue::loadValue(bool force)
{
- if(!mVariable.empty())
+ if (!mVariable.empty())
{
int value = DataManager::GetIntValue(mVariable);
- if(mValue == value && !force)
+ if (mValue == value && !force)
return;
mValue = value;
@@ -208,7 +208,7 @@
}
mRenderH = mSliderH;
- if(mShowCurr)
+ if (mShowCurr)
mRenderH += mFontHeight;
if (mLabel)
@@ -230,7 +230,7 @@
mActionW = mRenderW;
mActionH = mRenderH;
- if(mBackgroundImage && mBackgroundImage->GetResource())
+ if (mBackgroundImage && mBackgroundImage->GetResource())
{
mLineW = mBackgroundImage->GetWidth();
mLineH = mBackgroundImage->GetHeight();
@@ -260,7 +260,7 @@
return 0;
}
- if(mLabel)
+ if (mLabel)
{
int w, h;
mLabel->GetCurrentBounds(w, h);
@@ -270,12 +270,12 @@
mLabel->SetRenderPos(textX, mRenderY);
}
int res = mLabel->Render();
- if(res < 0)
+ if (res < 0)
return res;
}
// line
- if(mBackgroundImage && mBackgroundImage->GetResource())
+ if (mBackgroundImage && mBackgroundImage->GetResource())
{
gr_blit(mBackgroundImage->GetResource(), 0, 0, mLineW, mLineH, mLineX, mLineY);
}
@@ -288,10 +288,10 @@
// slider
uint32_t sliderX = mLineX + (mValuePct*(mLineW - mSliderW))/100;
- if(mHandleImage && mHandleImage->GetResource())
+ if (mHandleImage && mHandleImage->GetResource())
{
gr_surface s = mHandleImage->GetResource();
- if(mDragging && mHandleHoverImage && mHandleHoverImage->GetResource())
+ if (mDragging && mHandleHoverImage && mHandleHoverImage->GetResource())
s = mHandleHoverImage->GetResource();
gr_blit(s, 0, 0, mSliderW, mSliderH, sliderX, mLineY + (mLineH/2 - mSliderH/2));
}
@@ -302,16 +302,16 @@
}
void *fontResource = NULL;
- if(mFont) fontResource = mFont->GetResource();
+ if (mFont) fontResource = mFont->GetResource();
gr_color(mTextColor.red, mTextColor.green, mTextColor.blue, mTextColor.alpha);
- if(mShowRange)
+ if (mShowRange)
{
int rangeY = (mLineY - mLineH/2) - mFontHeight/2;
gr_textEx_scaleW(mRenderX + mPadding/2, rangeY, mMinStr.c_str(), fontResource, mRenderW, TOP_LEFT, 0);
gr_textEx_scaleW(mLineX + mLineW + mPadding/2, rangeY, mMaxStr.c_str(), fontResource, mRenderW, TOP_LEFT, 0);
}
- if(mValueStr && mShowCurr)
+ if (mValueStr && mShowCurr)
{
sprintf(mValueStr, "%d", mValue);
int textW = measureText(mValueStr);
@@ -329,7 +329,7 @@
if (!mRendered)
return 2;
- if(mLabel)
+ if (mLabel)
return mLabel->Update();
return 0;
}
@@ -406,7 +406,7 @@
mLabel->NotifyVarChange(varName, value);
if (varName == mVariable) {
int newVal = atoi(value.c_str());
- if(newVal != mValue) {
+ if (newVal != mValue) {
mValue = newVal;
mValuePct = pctFromValue(mValue);
mRendered = false;