Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d56988d1 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

Fix google-explicit-constructor warnings in vulkan.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I13c32bd5bc53fe897df58eda331ff70ebcf0b349
parent 0322a717
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -85,9 +85,9 @@ class DebugReportCallbackList {

class DebugReportLogger {
   public:
    DebugReportLogger(const VkInstanceCreateInfo& info)
    explicit DebugReportLogger(const VkInstanceCreateInfo& info)
        : instance_pnext_(info.pNext), callbacks_(nullptr) {}
    DebugReportLogger(const DebugReportCallbackList& callbacks)
    explicit DebugReportLogger(const DebugReportCallbackList& callbacks)
        : instance_pnext_(nullptr), callbacks_(&callbacks) {}

    void Message(VkDebugReportFlagsEXT flags,
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ VK_DEFINE_HANDLE(InstanceDispatchable)
VK_DEFINE_HANDLE(DeviceDispatchable)

struct InstanceData {
    InstanceData(const VkAllocationCallbacks& alloc)
    explicit InstanceData(const VkAllocationCallbacks& alloc)
        : opaque_api_data(),
          allocator(alloc),
          driver(),
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ struct Layer;

class LayerRef {
   public:
    LayerRef(const Layer* layer);
    explicit LayerRef(const Layer* layer);
    LayerRef(LayerRef&& other);
    ~LayerRef();
    LayerRef(const LayerRef&) = delete;