summaryrefslogtreecommitdiff
path: root/src/gui/updaterwindow.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-02-09 14:31:05 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-02-09 17:14:25 +0100
commitb5e416f8cd52f69ff1edd832ee10bac550544ef6 (patch)
tree2df592038ba092e67f458fd9945999add7d50056 /src/gui/updaterwindow.h
parent1b041ecccfbe44a4f50ffc086e3996e2b6eea4f7 (diff)
downloadMana-b5e416f8cd52f69ff1edd832ee10bac550544ef6.tar.gz
Mana-b5e416f8cd52f69ff1edd832ee10bac550544ef6.tar.bz2
Mana-b5e416f8cd52f69ff1edd832ee10bac550544ef6.tar.xz
Mana-b5e416f8cd52f69ff1edd832ee10bac550544ef6.zip
Some cleanups in UpdaterWindow and BrowserBox
Doing some cleanups before working towards optimizing this code. Removed needless additional wrapping code in BrowserBox::addRow, since the text will be relayouted anyway. Simplified layouting code a little. For example, there's no need to keep track of the number of wrapped lines. Use more optimal data structures, like an std::deque for the text rows and a plain std::vector for the line parts. Both have less fragmentation than an std::list.
Diffstat (limited to 'src/gui/updaterwindow.h')
-rw-r--r--src/gui/updaterwindow.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/updaterwindow.h b/src/gui/updaterwindow.h
index 6c69cd9b..2d1b059b 100644
--- a/src/gui/updaterwindow.h
+++ b/src/gui/updaterwindow.h
@@ -39,14 +39,13 @@ class Button;
class ProgressBar;
class ScrollArea;
-struct updateFile
+struct UpdateFile
{
- public:
- std::string name;
- std::string hash;
- std::string type;
- bool required;
- std::string desc;
+ std::string name;
+ std::string hash;
+ std::string type;
+ bool required;
+ std::string desc;
};
/**
@@ -76,7 +75,7 @@ class UpdaterWindow : public Window, public gcn::ActionListener,
/**
* Set's progress bar status
*/
- void setProgress(float p);
+ void setProgress(float progress);
/**
* Set's label above progress
@@ -176,7 +175,7 @@ private:
Net::Download *mDownload = nullptr;
/** List of files to download. */
- std::vector<updateFile> mUpdateFiles;
+ std::vector<UpdateFile> mUpdateFiles;
/** Index of the file to be downloaded. */
unsigned int mUpdateIndex = 0;