summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-06-22 07:44:59 +0000
committerrubidium <rubidium@openttd.org>2013-06-22 07:44:59 +0000
commite797f53c33f54b07b0777f5eda876b1d505a049c (patch)
tree14328add20fc743ac3b19c2f7af2722e0dc86f70 /src
parentd0fe055ae41b02c4bea754fe099d82d3ae297406 (diff)
downloadopenttd-e797f53c33f54b07b0777f5eda876b1d505a049c.tar.xz
(svn r25432) -Fix [FS#5608]: clang compiler error; sometimes it's more strict than others
Diffstat (limited to 'src')
-rw-r--r--src/station_gui.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 67a5d68d8..1a0923949 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -956,6 +956,16 @@ public:
*/
CargoDataSet::iterator End() const { return this->children->end(); }
+ /**
+ * Has this entry transfers.
+ */
+ bool HasTransfers() const { return this->transfers; }
+
+ /**
+ * Set the transfers state.
+ */
+ void SetTransfers(bool value) { this->transfers = value; }
+
void Clear();
private:
@@ -1322,7 +1332,7 @@ struct StationViewWindow : public Window {
case GR_CARGO:
assert(i == 0);
data = data->InsertOrRetrieve(cargo);
- data->transfers = (source != this->window_number);
+ data->SetTransfers(source != this->window_number);
expand = expand->Retrieve(cargo);
break;
case GR_SOURCE:
@@ -1759,7 +1769,7 @@ struct StationViewWindow : public Window {
} else {
/* Only draw '+' if there is something to be shown. */
const StationCargoList &list = Station::Get(this->window_number)->goods[cargo].cargo;
- if (grouping == GR_CARGO && (list.ReservedCount() > 0 || cd->transfers)) {
+ if (grouping == GR_CARGO && (list.ReservedCount() > 0 || cd->HasTransfers())) {
sym = "+";
}
}