[matroska] r936 - trunk/libebml/ebml
| Newsgroups | gmane.comp.multimedia.matroska.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mosu
Date: 2004-11-10 23:46:28 +0300 (Wed, 10 Nov 2004)
New Revision: 936
Modified:
trunk/libebml/ebml/EbmlId.h
trunk/libebml/ebml/EbmlUnicodeString.h
Log:
Added some operator!= to avoid confusion and mistakes with comparison and automatic casting.
Modified: trunk/libebml/ebml/EbmlId.h
===================================================================
--- trunk/libebml/ebml/EbmlId.h 2004-10-27 23:25:28 UTC (rev 935)
+++ trunk/libebml/ebml/EbmlId.h 2004-11-10 20:46:28 UTC (rev 936)
@@ -66,6 +66,10 @@
{
return ((TestId.Length == Length) && (TestId.Value == Value));
}
+ inline bool operator!=(const EbmlId & TestId) const
+ {
+ return !(*this == TestId);
+ }
inline void Fill(binary * Buffer) const {
unsigned int i;
Modified: trunk/libebml/ebml/EbmlUnicodeString.h
===================================================================
--- trunk/libebml/ebml/EbmlUnicodeString.h 2004-10-27 23:25:28 UTC (rev 935)
+++ trunk/libebml/ebml/EbmlUnicodeString.h 2004-11-10 20:46:28 UTC (rev 936)
@@ -59,7 +59,11 @@
UTFstring(const UTFstring &);
virtual ~UTFstring();
- bool operator==(const UTFstring&) const;
+ bool operator==(const UTFstring&) const;
+ inline bool operator!=(const UTFstring &cmp) const
+ {
+ return !(*this == cmp);
+ }
UTFstring & operator=(const UTFstring &);
UTFstring & operator=(const wchar_t *);
UTFstring & operator=(wchar_t);