[Impeller] removed operator overload (c++ style violation) (flutter/engine#47658)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
gaaclarke
2023-11-03 10:22:05 -07:00
committed by GitHub
parent 7ea3e185b0
commit 28cab3b275
2 changed files with 2 additions and 4 deletions

View File

@@ -206,9 +206,7 @@ struct Command : public ResourceBinder {
BufferView GetVertexBuffer() const;
constexpr explicit operator bool() const {
return pipeline && pipeline->IsValid();
}
bool IsValid() const { return pipeline && pipeline->IsValid(); }
private:
template <class T>

View File

@@ -44,7 +44,7 @@ void RenderPass::SetLabel(std::string label) {
}
bool RenderPass::AddCommand(Command&& command) {
if (!command) {
if (!command.IsValid()) {
VALIDATION_LOG << "Attempted to add an invalid command to the render pass.";
return false;
}