diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-11-05 01:09:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-11-05 01:09:30 +0300 |
commit | 485e9bb12bf5dda318ac0ccbf1d2a1cd86cf8c70 (patch) | |
tree | ce74f5a2fb646439cb58c2d85bc67ff29b70dbb7 /src/gui/widgets | |
parent | 33f4a30373c8978d4e4f29422a5b0132fd14a0ec (diff) | |
download | manaverse-485e9bb12bf5dda318ac0ccbf1d2a1cd86cf8c70.tar.gz manaverse-485e9bb12bf5dda318ac0ccbf1d2a1cd86cf8c70.tar.bz2 manaverse-485e9bb12bf5dda318ac0ccbf1d2a1cd86cf8c70.tar.xz manaverse-485e9bb12bf5dda318ac0ccbf1d2a1cd86cf8c70.zip |
Fix code style.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/layoutarray.cpp | 5 | ||||
-rw-r--r-- | src/gui/widgets/popup.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_input.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/textbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 12 |
6 files changed, 24 insertions, 12 deletions
diff --git a/src/gui/widgets/layoutarray.cpp b/src/gui/widgets/layoutarray.cpp index 46dd07085..a86d0111e 100644 --- a/src/gui/widgets/layoutarray.cpp +++ b/src/gui/widgets/layoutarray.cpp @@ -299,7 +299,10 @@ void LayoutArray::reflow(const int nx, const int ny, [CAST_SIZE(gridX)]; if ((cell != nullptr) && cell->mType != LayoutCell::NONE) { - int dx = x, dy = y, dw = 0, dh = 0; + int dx = x; + int dy = y; + int dw = 0; + int dh = 0; align(dx, dw, 0, *cell, &widths[CAST_SIZE(gridX)], szW - gridX); align(dy, dh, 1, *cell, diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp index 4ae11bbd1..c676de26e 100644 --- a/src/gui/widgets/popup.cpp +++ b/src/gui/widgets/popup.cpp @@ -175,8 +175,10 @@ void Popup::setLocationRelativeTo(const Widget *const widget) if (widget == nullptr) return; - int wx, wy; - int x, y; + int wx; + int wy; + int x; + int y; widget->getAbsolutePosition(wx, wy); getAbsolutePosition(x, y); diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 52372c385..cce45deee 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -1019,7 +1019,8 @@ Rect ScrollArea::getVerticalMarkerDimension() if (!mVBarVisible) return Rect(0, 0, 0, 0); - int length, pos; + int length; + int pos; int height; const int h2 = mShowButtons ? mScrollbarWidth : mMarkerSize / 2; @@ -1076,7 +1077,8 @@ Rect ScrollArea::getHorizontalMarkerDimension() if (!mHBarVisible) return Rect(0, 0, 0, 0); - int length, pos; + int length; + int pos; int width; const int w2 = mShowButtons ? mScrollbarWidth : mMarkerSize / 2; diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp index adf9245bf..49b31c5fe 100644 --- a/src/gui/widgets/tabs/setup_input.cpp +++ b/src/gui/widgets/tabs/setup_input.cpp @@ -151,7 +151,8 @@ Setup_Input::~Setup_Input() void Setup_Input::apply() { keyUnresolved(); - InputActionT key1, key2; + InputActionT key1; + InputActionT key2; if (inputManager.hasConflicts(key1, key2)) { diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp index 905347f89..545f52fa3 100644 --- a/src/gui/widgets/textbox.cpp +++ b/src/gui/widgets/textbox.cpp @@ -554,9 +554,9 @@ void TextBox::setCaretRow(const int row) unsigned int TextBox::getCaretPosition() const { - int pos = 0, row; + int pos = 0; - for (row = 0; row < mCaretRow; row++) + for (int row = 0; row < mCaretRow; row++) pos += CAST_S32(mTextRows[row].size()); return pos + mCaretColumn; diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 3df552404..f76c5fb9e 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -510,8 +510,10 @@ void Window::setLocationRelativeTo(const Widget *const widget) if (widget == nullptr) return; - int wx, wy; - int x, y; + int wx; + int wy; + int x; + int y; widget->getAbsolutePosition(wx, wy); getAbsolutePosition(x, y); @@ -527,8 +529,10 @@ void Window::setLocationHorisontallyRelativeTo(const Widget *const widget) if (widget == nullptr) return; - int wx, wy; - int x, y; + int wx; + int wy; + int x; + int y; widget->getAbsolutePosition(wx, wy); getAbsolutePosition(x, y); |