[matroska] r1065 - in trunk/libebml: ebml src
| Newsgroups | gmane.comp.multimedia.matroska.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: robux4
Date: 2005-02-06 00:30:28 +0300 (Sun, 06 Feb 2005)
New Revision: 1065
Modified:
trunk/libebml/ebml/EbmlBinary.h
trunk/libebml/src/EbmlBinary.cpp
Log:
libebml: allow binary element comparison (useful to compare UIDs)
Modified: trunk/libebml/ebml/EbmlBinary.h
===================================================================
--- trunk/libebml/ebml/EbmlBinary.h 2005-02-01 20:33:46 UTC (rev 1064)
+++ trunk/libebml/ebml/EbmlBinary.h 2005-02-05 21:30:28 UTC (rev 1065)
@@ -90,6 +90,8 @@
return false;
}
+ bool operator==(const EbmlBinary & ElementToCompare);
+
protected:
binary *Data; // the binary data inside the element
};
Modified: trunk/libebml/src/EbmlBinary.cpp
===================================================================
--- trunk/libebml/src/EbmlBinary.cpp 2005-02-01 20:33:46 UTC (rev 1064)
+++ trunk/libebml/src/EbmlBinary.cpp 2005-02-05 21:30:28 UTC (rev 1065)
@@ -96,4 +96,9 @@
return input.read(Data, Size);
}
+bool EbmlBinary::operator==(const EbmlBinary & ElementToCompare)
+{
+ return ((Size == ElementToCompare.Size) && memcmp(Data, ElementToCompare.Data, Size));
+}
+
END_LIBEBML_NAMESPACE