Skip to content

Commit

Permalink
Removed whitespace and empty lines
Browse files Browse the repository at this point in the history
Minor tidy
  • Loading branch information
midwan authored and Jarod42 committed Sep 12, 2024
1 parent a3c5d27 commit a3019c9
Show file tree
Hide file tree
Showing 22 changed files with 12 additions and 45 deletions.
1 change: 0 additions & 1 deletion include/guisan/exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@

namespace gcn
{

/**
* An exception containing a message, a file and a line number
* where the exception occured. Guisan will only throw exceptions
Expand Down
2 changes: 1 addition & 1 deletion include/guisan/focushandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace gcn
/**
* Destructor.
*/
virtual ~FocusHandler() { };
virtual ~FocusHandler() { }

/**
* Requests focus for a widget. Focus will only be granted to a widget
Expand Down
1 change: 0 additions & 1 deletion include/guisan/listmodel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ namespace gcn
*/
class GCN_CORE_DECLSPEC ListModel
{

public:
/**
* Destructor.
Expand Down
12 changes: 6 additions & 6 deletions include/guisan/sdl/sdltruetypefont.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
namespace gcn
{
class Graphics;

/**
* SDL True Type Font implementation of Font. It uses the SDL_ttf library
* to display True Type Fonts with SDL.
Expand All @@ -78,28 +78,28 @@ namespace gcn
* @param filename the filename of the True Type Font.
* @param size the size the font should be in.
*/
SDLTrueTypeFont (const std::string& filename, int size);
SDLTrueTypeFont(const std::string& filename, int size);

/**
* Destructor.
*/
virtual ~SDLTrueTypeFont();

/**
* Sets the spacing between rows in pixels. Default is 0 pixels.
* The spacing can be negative.
*
* @param spacing the spacing in pixels.
*/
virtual void setRowSpacing (int spacing);
virtual void setRowSpacing(int spacing);

/**
* Gets the spacing between rows in pixels.
*
* @return the spacing.
*/
virtual int getRowSpacing();

/**
* Sets the spacing between letters in pixels. Default is 0 pixels.
* The spacing can be negative.
Expand Down
1 change: 0 additions & 1 deletion src/actionevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,3 @@ namespace gcn
return mId;
}
}

3 changes: 0 additions & 3 deletions src/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ namespace gcn
b(0),
a(255)
{

}

Color::Color(int color)
Expand All @@ -79,7 +78,6 @@ namespace gcn
g((color >> 8) & 0xFF),
a(255)
{

}

Color::Color(int ar, int ag, int ab, int aa)
Expand All @@ -89,7 +87,6 @@ namespace gcn
b(ab),
a(aa)
{

}

Color Color::operator+(const Color& color) const
Expand Down
1 change: 0 additions & 1 deletion src/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ namespace gcn
return mSource;
}
}

2 changes: 0 additions & 2 deletions src/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ namespace gcn
mFilename("?"),
mLine(0)
{

}

Exception::Exception(const std::string& message)
Expand All @@ -89,7 +88,6 @@ namespace gcn
mFilename(filename),
mLine(line)
{

}

const std::string& Exception::getFunction() const
Expand Down
1 change: 0 additions & 1 deletion src/focushandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ namespace gcn
mLastWidgetWithModalMouseInputFocus(NULL),
mLastWidgetPressed(NULL)
{

}

void FocusHandler::requestFocus(Widget* widget)
Expand Down
2 changes: 0 additions & 2 deletions src/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@

namespace gcn
{

Graphics::Graphics()
{
mFont = NULL;
Expand Down Expand Up @@ -143,7 +142,6 @@ namespace gcn

void Graphics::popClipArea()
{

if (mClipStack.empty())
{
throw GCN_EXCEPTION("Tried to pop clip area from empty stack.");
Expand Down
3 changes: 0 additions & 3 deletions src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ namespace gcn

handleKeyInput();
handleMouseInput();

} // end if

mTop->logic();
Expand Down Expand Up @@ -343,7 +342,6 @@ namespace gcn
mFocusHandler->tabNext();
}
}

} // end while
}

Expand Down Expand Up @@ -806,7 +804,6 @@ namespace gcn
{
break;
}

}

Widget* swap = widget;
Expand Down
2 changes: 0 additions & 2 deletions src/keyinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ namespace gcn
mMetaPressed(false),
mNumericPad(false)
{

}

void KeyInput::setType(unsigned int type)
Expand Down Expand Up @@ -144,4 +143,3 @@ namespace gcn
mNumericPad = numpad;
}
}

13 changes: 4 additions & 9 deletions src/sdl/sdl2graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@

namespace gcn
{

SDL2Graphics::SDL2Graphics()
{
mAlpha = false;
Expand Down Expand Up @@ -191,7 +190,7 @@ namespace gcn
throw GCN_EXCEPTION("Trying to draw an image of unknown format, must be an SDLImage.");
}

if(srcImage->getTexture() == NULL)
if (srcImage->getTexture() == NULL)
{
SDL_FillRect(mTarget, &temp, SDL_MapRGBA(mTarget->format, 0xff, 0, 0xff, 0));
SDL_BlitSurface(srcImage->getSurface(), &src, mTarget, &temp);
Expand All @@ -201,14 +200,13 @@ namespace gcn
else
{
SDL_RenderCopy(mRenderTarget, srcImage->getTexture(), &src, &dst);
}

}
}

void SDL2Graphics::fillRectangle(const Rectangle& rectangle)
{
if (mClipStack.empty()) {
throw GCN_EXCEPTION("Clip stack is empty, perhaps you"
if (mClipStack.empty()) {
throw GCN_EXCEPTION("Clip stack is empty, perhaps you"
"called a draw function outside of _beginDraw() and _endDraw()?");
}

Expand Down Expand Up @@ -239,7 +237,6 @@ namespace gcn
SDL_SetRenderDrawColor(mRenderTarget, mColor.r, mColor.g, mColor.b, mColor.a);
SDL_RenderFillRect(mRenderTarget, &rect);
restoreRenderColor();

}
else
{
Expand All @@ -253,7 +250,6 @@ namespace gcn
SDL_SetRenderDrawColor(mRenderTarget, mColor.r, mColor.g, mColor.b, mColor.a);
SDL_RenderFillRect(mRenderTarget, &rect);
restoreRenderColor();

}
}

Expand Down Expand Up @@ -395,7 +391,6 @@ namespace gcn

void SDL2Graphics::drawLine(int x1, int y1, int x2, int y2)
{

if (mClipStack.empty()) {
throw GCN_EXCEPTION("Clip stack is empty, perhaps you"
"called a draw function outside of _beginDraw() and _endDraw()?");
Expand Down
2 changes: 0 additions & 2 deletions src/sdl/sdlgraphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@

namespace gcn
{

SDLGraphics::SDLGraphics()
{
mAlpha = false;
Expand Down Expand Up @@ -209,7 +208,6 @@ namespace gcn
}
}
SDL_UnlockSurface(mTarget);

}
else
{
Expand Down
3 changes: 1 addition & 2 deletions src/sdl/sdlimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ namespace gcn
SDL_SetTextureBlendMode(tmpTexture, SDL_BLENDMODE_BLEND);
SDL_DestroyTexture(mTexture);
mTexture = tmpTexture;
}

}
}

void SDLImage::free()
Expand Down
1 change: 0 additions & 1 deletion src/sdl/sdlinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ namespace gcn
mMouseInWindow = true;
}
break;

} // end switch
}

Expand Down
1 change: 0 additions & 1 deletion src/selectionevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,3 @@ namespace gcn

}
}

2 changes: 0 additions & 2 deletions src/widgets/checkbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@

namespace gcn
{

CheckBox::CheckBox()
{
setSelected(false);
Expand Down Expand Up @@ -210,4 +209,3 @@ namespace gcn
distributeActionEvent();
}
}

1 change: 0 additions & 1 deletion src/widgets/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@

namespace gcn
{

Container::Container()
{
mOpaque = true;
Expand Down
1 change: 0 additions & 1 deletion src/widgets/radiobutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ namespace gcn
{
graphics->drawLine(hh - i, h - 4 - i, hh + i, h - 4 - i);
}

}
}

Expand Down
1 change: 0 additions & 1 deletion src/widgets/tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,3 @@ namespace gcn
mHasMouse = false;
}
}

1 change: 0 additions & 1 deletion src/widgets/tabbedarea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ namespace gcn
mTabContainer->getHeight(),
mSelectedTab->getX() + mSelectedTab->getWidth() - 2,
mTabContainer->getHeight());

}

drawChildren(graphics);
Expand Down

0 comments on commit a3019c9

Please sign in to comment.