mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Eliminated most build errors (gcc,linux,wxGTK).
What is left is mostly:
- warning: converting double to int
-> add a cast/to_int or ignore
- wrong initialization order in ctor
-> just swap the order to match the class
- errors about wxCursors
-> add a function loadResourceCursor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@183 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
// ----------------------------------------------------------------------------- : AtomicInt : windows
|
||||
|
||||
#ifdef _WX_MSW_
|
||||
#ifdef __WXMSW__
|
||||
|
||||
#ifdef _MSC_VER
|
||||
extern "C" {
|
||||
|
||||
@@ -57,14 +57,14 @@ OrderCache<T>::OrderCache(const vector<T>& keys, const vector<String>& values) {
|
||||
// initialize positions, use pos to point back to the values vector
|
||||
positions.reserve(keys.size());
|
||||
int i = 0;
|
||||
for (vector<T>::const_iterator it = keys.begin() ; it != keys.end() ; ++it, ++i) {
|
||||
for (typename vector<T>::const_iterator it = keys.begin() ; it != keys.end() ; ++it, ++i) {
|
||||
positions.push_back(KV(&**it, i));
|
||||
}
|
||||
// sort the KVs by the values
|
||||
sort(positions.begin(), positions.end(), CompareValues(values));
|
||||
// update positions, to point to sorted list
|
||||
i = 0;
|
||||
for (vector<KV>::iterator it = positions.begin() ; it != positions.end() ; ++it, ++i) {
|
||||
for (typename vector<KV>::iterator it = positions.begin() ; it != positions.end() ; ++it, ++i) {
|
||||
it->second = i;
|
||||
}
|
||||
// sort the KVs by the keys
|
||||
|
||||
@@ -152,6 +152,11 @@ class RealRect : private RealPoint, private RealSize {
|
||||
int i_t = to_int(y), i_b = to_int(bottom());
|
||||
return wxRect(i_l, i_t, i_r - i_l, i_b - i_t);
|
||||
}
|
||||
|
||||
/// Explicit conversion to wxRect, to not confuse gcc
|
||||
inline wxRect toRect() const {
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
/// Split a rectangle horizontally
|
||||
|
||||
Reference in New Issue
Block a user