Created
May 18, 2014 18:08
-
-
Save mcs07/49b5e1938261f7e291c5 to your computer and use it in GitHub Desktop.
Patch for Lilly MedChem Rules to compile on OS X Mavericks with clang.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/include/iwaray.h b/include/iwaray.h | |
index 1b58e95..213f25a 100644 | |
--- a/include/iwaray.h | |
+++ b/include/iwaray.h | |
@@ -341,7 +341,7 @@ resizable_array_p<T>::resizable_array_p (int n) | |
template <typename T> | |
resizable_array_p<T>::resizable_array_p (T * item) | |
{ | |
- add (item); | |
+ this->add (item); | |
return; | |
} | |
@@ -1068,9 +1068,9 @@ resizable_array_base<T>::insert_at_beginning (const T item_to_insert) | |
assert (ok ()); | |
if (0 == _number_elements ) | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
else | |
- return insert_before (0, item_to_insert); | |
+ return this->insert_before (0, item_to_insert); | |
} | |
template <typename T> | |
@@ -1081,7 +1081,7 @@ resizable_array_base<T>::insert_in_order (T item_to_insert, | |
assert (ok ()); | |
if (0 == _number_elements) | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
int i; | |
for (i = 0; i < _number_elements; i++) | |
@@ -1091,9 +1091,9 @@ resizable_array_base<T>::insert_in_order (T item_to_insert, | |
} | |
if (i == _number_elements) | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
- return insert_before (i, item_to_insert); | |
+ return this->insert_before (i, item_to_insert); | |
} | |
template <typename T> | |
@@ -1101,39 +1101,39 @@ int | |
resizable_array<T>::insert_in_order (const T item_to_insert, int increasing_order) | |
{ | |
if (0 == _number_elements) | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
if (increasing_order) | |
{ | |
if (item_to_insert < _things[0]) | |
- return insert_at_beginning (item_to_insert); | |
+ return this->insert_at_beginning (item_to_insert); | |
if (item_to_insert >= _things[_number_elements - 1]) | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
for (int i = 0; i < _number_elements; i++) | |
{ | |
if (item_to_insert < _things[i]) | |
- return insert_before (i, item_to_insert); | |
+ return this->insert_before (i, item_to_insert); | |
} | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
} | |
else // decreasing order, largest first. | |
{ | |
if (item_to_insert > _things[0]) | |
- return insert_at_beginning (item_to_insert); | |
+ return this->insert_at_beginning (item_to_insert); | |
if (item_to_insert <= _things[_number_elements - 1]) | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
for (int i = 0; i < _number_elements; i++) | |
{ | |
if (item_to_insert > _things[i]) | |
- return insert_before (i, item_to_insert); | |
+ return this->insert_before (i, item_to_insert); | |
} | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
} | |
} | |
@@ -1142,33 +1142,33 @@ int | |
resizable_array<T>::insert_in_order_if_not_already_present (const T item_to_insert, int increasing_order) | |
{ | |
if (0 == _number_elements) | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
if (increasing_order) | |
{ | |
for (int i = 0; i < _number_elements; i++) | |
{ | |
if (item_to_insert < _things[i]) | |
- return insert_before (i, item_to_insert); | |
+ return this->insert_before (i, item_to_insert); | |
if (item_to_insert == _things[i]) | |
return 0; | |
} | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
} | |
else // decreasing order, largest first. | |
{ | |
for (int i = 0; i < _number_elements; i++) | |
{ | |
if (item_to_insert > _things[i]) | |
- return insert_before (i, item_to_insert); | |
+ return this->insert_before (i, item_to_insert); | |
if (item_to_insert == _things[i]) | |
return 0; | |
} | |
- return add (item_to_insert); | |
+ return this->add (item_to_insert); | |
} | |
return 0; // no path to here | |
@@ -1205,7 +1205,7 @@ resizable_array_base<T>::operator += (const resizable_array_base<T> & oo) | |
for (int i = 0; i < noo; i++) | |
{ | |
- add (oo.item (i)); | |
+ this->add (oo.item (i)); | |
} | |
return; | |
@@ -1215,7 +1215,7 @@ template <typename T> | |
void | |
resizable_array_base<T>::operator += (T extra) | |
{ | |
- (void) add (extra); | |
+ (void) this->add (extra); | |
return; | |
} | |
@@ -1260,7 +1260,7 @@ resizable_array_p<T>::transfer_in (resizable_array_p<T> & oo, | |
assert (oo.ok_index (item_to_transfer)); | |
T * tmp = oo._things[item_to_transfer]; | |
- add (tmp); | |
+ this->add (tmp); | |
oo.remove_no_delete (item_to_transfer); | |
return 1; | |
@@ -1462,7 +1462,7 @@ resizable_array<T>::add_non_duplicated_elements (const resizable_array<T> & qq) | |
} | |
if (0 == foundqi) | |
{ | |
- add (qi); | |
+ this->add (qi); | |
rc++; | |
} | |
} | |
@@ -1482,7 +1482,7 @@ resizable_array<T>::add_if_not_already_present (const T qq) | |
// No match found, add qq | |
- return add (qq); | |
+ return this->add (qq); | |
} | |
/*template <typename T> | |
diff --git a/include/iwarchive.h b/include/iwarchive.h | |
index b59e8e1..bdaa730 100644 | |
--- a/include/iwarchive.h | |
+++ b/include/iwarchive.h | |
@@ -104,7 +104,7 @@ iwarchive<T>::debug_print (ostream & os) const | |
if (_match_any) | |
os << "This archive will match any value\n"; | |
- | |
+ | |
for (int i = 0; i < _number_elements; i++) | |
{ | |
os << "Item " << i << " will match " << _things[i] << endl; | |
@@ -177,7 +177,7 @@ iwarchive<T>::operator = (const iwarchive<T> & other) | |
{ | |
_match_any = other._match_any; | |
- resize (other._elements_allocated); | |
+ this->resize (other._elements_allocated); | |
for (int i = 0; i < other._number_elements; i++) | |
{ | |
_things[i] = other._things[i]; | |
diff --git a/include/minmaxspc.h b/include/minmaxspc.h | |
index f9daa46..6fa3a68 100644 | |
--- a/include/minmaxspc.h | |
+++ b/include/minmaxspc.h | |
@@ -168,7 +168,7 @@ Min_Max_Specifier<T>::ok () const | |
} | |
template <typename T> | |
-int | |
+int | |
Min_Max_Specifier<T>::debug_print (ostream & os) const | |
{ | |
os << "Details on Min_Max_Specifier<T>::"; | |
@@ -191,7 +191,7 @@ Min_Max_Specifier<T>::debug_print (ostream & os) const | |
for (int i = 0; i < _number_elements; i++) | |
os << "Value " << i << " set " << _things[i] << endl; | |
- | |
+ | |
return 1; | |
} | |
@@ -272,7 +272,7 @@ template <typename T> | |
int | |
Min_Max_Specifier<T>::set_max (T v) | |
{ | |
- if (_number_elements) | |
+ if (_number_elements) | |
this->resize(0); | |
_max_val.set (v); | |
@@ -406,7 +406,7 @@ Min_Max_Specifier<T>::adjust_to_accommodate (const T v) | |
if (! check_archive) | |
return 1; | |
- if (! contains (v)) | |
+ if (! this->contains (v)) | |
add (v); | |
_match_any = 0; | |
@@ -581,7 +581,7 @@ Min_Max_Specifier<T>::write_compact_representation (ostream & os) const | |
template <class T> | |
ostream & | |
-operator << (ostream & os, const Min_Max_Specifier<T> & qq) | |
+operator << (ostream & os, const Min_Max_Specifier<T> & qq) | |
{ | |
os << "minmax: "; | |
@@ -590,7 +590,7 @@ operator << (ostream & os, const Min_Max_Specifier<T> & qq) | |
os << "min " << tmp; | |
if (qq.max (tmp)) | |
os << " max " << tmp; | |
- | |
+ | |
// This next line commented out because of template instantiation problems. | |
// The way things work now, this forces instantiation of the iwarchive<T> | |
// class, which then conflicts with the iwarchive<T> instantiation in its |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment