Add explicit in include/dawn

This CL adds some explicit notations to single argument constructors in
the include/dawn folder.

Bug: dawn:1339
Change-Id: Ie4e31bf68f920acfcfb27828a465e45fe0977af6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86443
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair
2022-04-12 17:43:21 +00:00
committed by Dawn LUCI CQ
parent b2fdd6402d
commit 012098a86b
7 changed files with 9 additions and 8 deletions

View File

@@ -69,6 +69,7 @@ namespace dawn::native {
class DAWN_NATIVE_EXPORT Adapter {
public:
Adapter();
// NOLINTNEXTLINE(runtime/explicit)
Adapter(AdapterBase* impl);
~Adapter();
@@ -124,7 +125,7 @@ namespace dawn::native {
const WGPUBackendType backendType;
protected:
AdapterDiscoveryOptionsBase(WGPUBackendType type);
explicit AdapterDiscoveryOptionsBase(WGPUBackendType type);
};
enum BackendValidationLevel { Full, Partial, Disabled };
@@ -222,7 +223,7 @@ namespace dawn::native {
ExternalImageType GetType() const;
protected:
ExternalImageDescriptor(ExternalImageType type);
explicit ExternalImageDescriptor(ExternalImageType type);
private:
ExternalImageType mType;
@@ -240,7 +241,7 @@ namespace dawn::native {
ExternalImageType GetType() const;
protected:
ExternalImageExportInfo(ExternalImageType type);
explicit ExternalImageExportInfo(ExternalImageType type);
private:
ExternalImageType mType;