decoder/dsdlib: convert struct dsdlib_id to a class

This commit is contained in:
Max Kellermann
2013-10-28 23:12:48 +01:00
parent c37edfd3e9
commit fd3dc7e5fb
4 changed files with 35 additions and 34 deletions

View File

@@ -41,13 +41,12 @@
#endif
bool
dsdlib_id_equals(const struct dsdlib_id *id, const char *s)
DsdId::Equals(const char *s) const
{
assert(id != nullptr);
assert(s != nullptr);
assert(strlen(s) == sizeof(id->value));
assert(strlen(s) == sizeof(value));
return memcmp(id->value, s, sizeof(id->value)) == 0;
return memcmp(value, s, sizeof(value)) == 0;
}
bool