Add implicit conversion for UniversalTResult

This commit is contained in:
Robbert van der Helm
2020-12-14 18:32:18 +01:00
parent 2becd420b2
commit cb7413c521
5 changed files with 44 additions and 62 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ UniversalTResult::UniversalTResult() : universal_result(Value::kResultFalse) {}
UniversalTResult::UniversalTResult(tresult native_result)
: universal_result(to_universal_result(native_result)) {}
tresult UniversalTResult::native() const {
UniversalTResult::operator tresult() const {
static_assert(Steinberg::kResultOk == Steinberg::kResultTrue);
switch (universal_result) {
case Value::kNoInterface:
+1 -1
View File
@@ -104,7 +104,7 @@ class UniversalTResult {
/**
* Get the native equivalent for the wrapped `tresult` value.
*/
tresult native() const;
operator tresult() const;
/**
* Get the original name for the result, e.g. `kResultOk`.