summaryrefslogtreecommitdiff
path: root/neuralnetworks/aidl/utils/src/Utils.cpp
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2022-03-01 01:29:04 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-03-01 01:29:04 +0000
commitc5087c06b38abafe6cb8154f733f7c1305cc1e31 (patch)
tree78a3e35e28e9a5999fc103d245bf1b0c8110f26d /neuralnetworks/aidl/utils/src/Utils.cpp
parent5974f5869b8a656f8dcaa98d8c0f6b5e1b0ff6e2 (diff)
parentbbd66d27a0515d1d9994adb3d8a43f6c71e8badc (diff)
Merge "Cast to the underlying type for union tags" am: 6cd0d474b2 am: 5eb895c047 am: bbd66d27a0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1999055 Change-Id: Ie0a38cc29d50c65b8168435c70786321fc9de199
Diffstat (limited to 'neuralnetworks/aidl/utils/src/Utils.cpp')
-rw-r--r--neuralnetworks/aidl/utils/src/Utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/neuralnetworks/aidl/utils/src/Utils.cpp b/neuralnetworks/aidl/utils/src/Utils.cpp
index 03407be4ce..76a0b07d86 100644
--- a/neuralnetworks/aidl/utils/src/Utils.cpp
+++ b/neuralnetworks/aidl/utils/src/Utils.cpp
@@ -88,7 +88,7 @@ nn::GeneralResult<Memory> clone(const Memory& memory) {
return Memory::make<Memory::Tag::hardwareBuffer>(std::move(handle));
}
}
- return (NN_ERROR() << "Unrecognized Memory::Tag: " << memory.getTag())
+ return (NN_ERROR() << "Unrecognized Memory::Tag: " << underlyingType(memory.getTag()))
.
operator nn::GeneralResult<Memory>();
}
@@ -103,7 +103,7 @@ nn::GeneralResult<RequestMemoryPool> clone(const RequestMemoryPool& requestPool)
}
// Using explicit type conversion because std::variant inside the RequestMemoryPool confuses the
// compiler.
- return (NN_ERROR() << "Unrecognized request pool tag: " << requestPool.getTag())
+ return (NN_ERROR() << "Unrecognized request pool tag: " << underlyingType(requestPool.getTag()))
.
operator nn::GeneralResult<RequestMemoryPool>();
}