summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-01-14 20:52:43 +0000
committerpeter1138 <peter1138@openttd.org>2008-01-14 20:52:43 +0000
commit1bcca5aae2fca73b227bda44f21f5509a03b17b9 (patch)
tree403d6db84201e97d2f97ca3cc66da59c2db7f02a /src
parent57ecf117c94e070f0aa267ecc0071e6ddabbb115 (diff)
downloadopenttd-1bcca5aae2fca73b227bda44f21f5509a03b17b9.tar.xz
(svn r11854) -Fix (r11848): Nightly build farm showed up more compiler warnings... c++ is fun
Diffstat (limited to 'src')
-rw-r--r--src/widgets/dropdown_type.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h
index 07390fb02..0928804ee 100644
--- a/src/widgets/dropdown_type.h
+++ b/src/widgets/dropdown_type.h
@@ -15,6 +15,8 @@ public:
int result; ///< Result code to return to window on selection
bool masked; ///< Masked and unselectable item
+ DropDownListItem(int result, bool masked) : result(result), masked(masked) {}
+ virtual ~DropDownListItem() {}
virtual StringID String() const;
};
@@ -25,12 +27,7 @@ class DropDownListStringItem : public DropDownListItem {
public:
StringID string; ///< String ID of item
- DropDownListStringItem(StringID string, uint result, bool masked)
- {
- this->string = string;
- this->result = result;
- this->masked = masked;
- }
+ DropDownListStringItem(StringID string, int result, bool masked) : DropDownListItem(result, masked), string(string) {}
StringID String() const;
};
@@ -42,7 +39,7 @@ class DropDownListParamStringItem : public DropDownListStringItem {
public:
uint64 decode_params[10]; ///< Parameters of the string
- DropDownListParamStringItem(StringID string, uint result, bool masked) : DropDownListStringItem(string, result, masked) {}
+ DropDownListParamStringItem(StringID string, int result, bool masked) : DropDownListStringItem(string, result, masked) {}
StringID String() const;
void SetParam(uint index, uint64 value) { decode_params[index] = value; }