Add stronger checking
- Add assertions to enforce that objects are of the correct kind and have been allocated. - Make destructors check if objects have been allocated before deleting. - Operations that require a non-NullDevice return failure if given a NullDevice. - Use static_cast rather than reinterpret_cast when cohersing from a base class to a derived class. Change-Id: I02ee0ea9d7982fd7ca29d49c9b02cfae111b7127
Ta zmiana jest zawarta w:
%! (template.HTML=
Tony Tye)złożyło 2021-01-13 08:24:28 +00:00
1 rodzic
001fd66cac
złożenie
e5431676d4
11 plików zmienionych
+96
-13
Żadne pliki nie pasują do Twojego wyszukiwania
@@ -598,6 +598,7 @@ bool Device::create() {
|
||||
}
|
||||
|
||||
// Create HSA settings
|
||||
assert(!settings_);
|
||||
settings_ = new Settings();
|
||||
roc::Settings* hsaSettings = static_cast<roc::Settings*>(settings_);
|
||||
if ((hsaSettings == nullptr) ||
|
||||
|
||||
Reference in new issue
Zablokuj użytkownika