summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorAndrew Meadows <andrew@lindenlab.com>2008-12-19 22:33:29 +0000
committerAndrew Meadows <andrew@lindenlab.com>2008-12-19 22:33:29 +0000
commit5b2f960ceb9c585ebc5b4907811cad1bfbe27dec (patch)
tree11aedf21a16ae9780e4f04731bbf377f19609dc9 /indra/llcommon
parent796a10d8e08f9672d497f0fc148e7313e30a3c84 (diff)
Fixing tut related compile errors on etch:
(1) the LLLand class had to be forward declared in a cpp file that did not include llland.h (2) ensure_equals(const char*, type, type) requires that type have an operator!=(type, type) defined. (3) ensure_equals(const char*, type, type) is so overloaded that the compiler can have trouble picking the right version when it has to implicitly cast a std::string to "const char*" AND multiple valid casts exist for type --> S32, F32, etc. To solve this problem we must explicitly pass in a "const char*" instead of a std::string. Reviewed with CG
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/lldate.cpp5
-rw-r--r--indra/llcommon/lldate.h2
-rw-r--r--indra/llcommon/lluri.cpp5
-rw-r--r--indra/llcommon/lluri.h3
4 files changed, 15 insertions, 0 deletions
diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp
index 3cc4cca706..6b4bd0d7ef 100644
--- a/indra/llcommon/lldate.cpp
+++ b/indra/llcommon/lldate.cpp
@@ -234,6 +234,11 @@ void LLDate::secondsSinceEpoch(F64 seconds)
mSecondsSinceEpoch = seconds;
}
+bool operator!=(const LLDate& first, const LLDate& second)
+{
+ return (first.secondsSinceEpoch() != second.secondsSinceEpoch());
+}
+
std::ostream& operator<<(std::ostream& s, const LLDate& date)
{
date.toStream(s);
diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h
index 7bff18d927..2b53c8cc9a 100644
--- a/indra/llcommon/lldate.h
+++ b/indra/llcommon/lldate.h
@@ -116,6 +116,8 @@ private:
F64 mSecondsSinceEpoch;
};
+// this operator required for tut
+bool operator!=(const LLDate& first, const LLDate& second);
// Helper function to stream out a date
std::ostream& operator<<(std::ostream& s, const LLDate& date);
diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp
index 57d55c7e71..173479ab33 100644
--- a/indra/llcommon/lluri.cpp
+++ b/indra/llcommon/lluri.cpp
@@ -599,3 +599,8 @@ std::string LLURI::mapToQueryString(const LLSD& queryMap)
}
return query_string;
}
+
+bool operator!=(const LLURI& first, const LLURI& second)
+{
+ return (first.asString() != second.asString());
+}
diff --git a/indra/llcommon/lluri.h b/indra/llcommon/lluri.h
index 953e652704..c2e6ef4a9b 100644
--- a/indra/llcommon/lluri.h
+++ b/indra/llcommon/lluri.h
@@ -187,4 +187,7 @@ private:
std::string mEscapedQuery;
};
+// this operator required for tut
+bool operator!=(const LLURI& first, const LLURI& second);
+
#endif // LL_LLURI_H