[Impeller] Clang tidy even more (flutter/engine#48102)

Also removes alot of includes of fml macros, which I know is always safe to remove.
This commit is contained in:
Jonah Williams 2023-11-16 15:15:00 -08:00 committed by GitHub
parent 6f471e9027
commit 6da29df7ee
33 changed files with 10 additions and 48 deletions

View File

@ -13,7 +13,7 @@ namespace impeller {
class Image {
public:
Image(std::shared_ptr<Texture> texture);
explicit Image(std::shared_ptr<Texture> texture);
~Image();

View File

@ -4,13 +4,10 @@
#include "impeller/archivist/archive.h"
#include <iterator>
#include "flutter/fml/logging.h"
#include "impeller/archivist/archive_class_registration.h"
#include "impeller/archivist/archive_database.h"
#include "impeller/archivist/archive_location.h"
#include "impeller/base/validation.h"
namespace impeller {

View File

@ -9,9 +9,7 @@
#include <optional>
#include <string>
#include <type_traits>
#include <vector>
#include "flutter/fml/macros.h"
#include "impeller/archivist/archivable.h"
namespace impeller {
@ -21,7 +19,7 @@ class ArchiveDatabase;
class Archive {
public:
Archive(const std::string& path);
explicit Archive(const std::string& path);
~Archive();
@ -45,7 +43,7 @@ class Archive {
template <class T,
class = std::enable_if_t<std::is_base_of<Archivable, T>::value>>
[[nodiscard]] size_t Read(UnarchiveStep stepper) {
[[nodiscard]] size_t Read(const UnarchiveStep& stepper) {
const ArchiveDef& def = T::kArchiveDefinition;
return UnarchiveInstances(def, stepper);
}

View File

@ -8,7 +8,6 @@
#include <memory>
#include <string>
#include "flutter/fml/macros.h"
#include "impeller/archivist/archive_transaction.h"
namespace impeller {
@ -22,7 +21,7 @@ struct ArchiveDef;
///
class ArchiveDatabase {
public:
ArchiveDatabase(const std::string& filename);
explicit ArchiveDatabase(const std::string& filename);
~ArchiveDatabase();

View File

@ -7,7 +7,6 @@
#include <optional>
#include <type_traits>
#include "flutter/fml/macros.h"
#include "impeller/archivist/archivable.h"
#include "impeller/archivist/archive.h"
#include "impeller/base/allocation.h"

View File

@ -7,7 +7,6 @@
#include <memory>
#include <type_traits>
#include "flutter/fml/macros.h"
#include "impeller/base/allocation.h"
namespace impeller {

View File

@ -5,8 +5,6 @@
#include <cstdint>
#include "flutter/fml/macros.h"
namespace impeller {
class ArchiveStatement;

View File

@ -4,7 +4,6 @@
#pragma once
#include "flutter/fml/macros.h"
#include "impeller/archivist/archive.h"
namespace impeller {
@ -28,7 +27,7 @@ class ArchiveVector : public Archivable {
ArchiveVector();
ArchiveVector(std::vector<int64_t> keys);
explicit ArchiveVector(std::vector<int64_t> keys);
ArchiveVector(const ArchiveVector&) = delete;

View File

@ -12,8 +12,6 @@
#include <sstream>
#include "flutter/fml/macros.h"
namespace impeller {
class ValidationLog {

View File

@ -47,7 +47,7 @@ struct CompilerBackend {
spirv_cross::Compiler* GetCompiler();
operator bool() const;
explicit operator bool() const;
enum class ExtendedResourceIndex {
kPrimary,

View File

@ -6,7 +6,6 @@
#include <string>
#include "flutter/fml/macros.h"
#include "flutter/fml/mapping.h"
#include "impeller/compiler/include_dir.h"
#include "shaderc/shaderc.hpp"

View File

@ -8,14 +8,13 @@
#include <string>
#include "flutter/fml/logging.h"
#include "flutter/fml/macros.h"
namespace impeller {
namespace compiler {
class AutoLogger {
public:
AutoLogger(std::stringstream& logger) : logger_(logger) {}
explicit AutoLogger(std::stringstream& logger) : logger_(logger) {}
~AutoLogger() {
logger_ << std::endl;

View File

@ -9,7 +9,6 @@
#include <string>
#include <vector>
#include "flutter/fml/macros.h"
#include "flutter/fml/unique_fd.h"
#include "impeller/compiler/include_dir.h"
#include "impeller/compiler/types.h"

View File

@ -7,7 +7,6 @@
#include <cstdint>
#include <vector>
#include "flutter/fml/macros.h"
#include "flutter/fml/mapping.h"
#include "impeller/compiler/includer.h"
#include "impeller/compiler/source_options.h"

View File

@ -10,7 +10,6 @@
#include <variant>
#include "flutter/fml/logging.h"
#include "flutter/fml/macros.h"
#include "spirv_glsl.hpp"
namespace impeller {

View File

@ -9,9 +9,7 @@
#include <memory>
#include "flutter/fml/command_line.h"
#include "flutter/fml/macros.h"
#include "flutter/fml/unique_fd.h"
#include "impeller/compiler/compiler.h"
#include "impeller/compiler/include_dir.h"
#include "impeller/compiler/types.h"

View File

@ -8,8 +8,6 @@
#include <string>
#include <string_view>
#include "flutter/fml/macros.h"
namespace impeller {
namespace compiler {

View File

@ -4,9 +4,6 @@
#pragma once
#include <string>
#include "flutter/fml/macros.h"
#include "flutter/fml/mapping.h"
#include "impeller/core/device_buffer_descriptor.h"
#include "impeller/core/texture.h"

View File

@ -4,7 +4,6 @@
#pragma once
#include "flutter/fml/macros.h"
#include "impeller/core/buffer.h"
#include "impeller/core/range.h"

View File

@ -7,7 +7,6 @@
#include <memory>
#include <string>
#include "flutter/fml/macros.h"
#include "impeller/core/allocator.h"
#include "impeller/core/buffer.h"
#include "impeller/core/buffer_view.h"

View File

@ -12,7 +12,6 @@
#include "flutter/fml/hash_combine.h"
#include "flutter/fml/logging.h"
#include "flutter/fml/macros.h"
#include "impeller/geometry/color.h"
#include "impeller/geometry/rect.h"
#include "impeller/geometry/scalar.h"

View File

@ -9,7 +9,6 @@
#include <string>
#include <type_traits>
#include "flutter/fml/macros.h"
#include "impeller/base/allocation.h"
#include "impeller/core/buffer.h"
#include "impeller/core/buffer_view.h"

View File

@ -10,7 +10,6 @@
#include <string>
#include "flutter/fml/logging.h"
#include "flutter/fml/macros.h"
#include "impeller/core/buffer_view.h"
#include "impeller/core/formats.h"
#include "impeller/core/sampler.h"

View File

@ -4,7 +4,6 @@
#pragma once
#include "flutter/fml/macros.h"
#include "impeller/core/sampler_descriptor.h"
namespace impeller {

View File

@ -6,7 +6,6 @@
#include <unordered_map>
#include "flutter/fml/macros.h"
#include "impeller/base/comparable.h"
#include "impeller/core/formats.h"

View File

@ -4,11 +4,8 @@
#pragma once
#include <optional>
#include "impeller/core/formats.h"
#include "impeller/geometry/size.h"
#include "impeller/image/decompressed_image.h"
namespace impeller {

View File

@ -17,7 +17,7 @@ struct VertexBuffer {
size_t vertex_count = 0u;
IndexType index_type = IndexType::kUnknown;
constexpr operator bool() const {
constexpr explicit operator bool() const {
return static_cast<bool>(vertex_buffer) &&
(index_type == IndexType::kNone || static_cast<bool>(index_buffer));
}

View File

@ -5,7 +5,6 @@
#pragma once
#include "flutter/display_list/dl_op_receiver.h"
#include "flutter/fml/macros.h"
#include "impeller/aiks/canvas_type.h"
#include "impeller/aiks/paint.h"

View File

@ -5,7 +5,6 @@
#pragma once
#include "flutter/display_list/image/dl_image.h"
#include "flutter/fml/macros.h"
#include "impeller/core/texture.h"
namespace impeller {

View File

@ -6,7 +6,6 @@
#include "flutter/display_list/display_list.h"
#include "flutter/display_list/dl_builder.h"
#include "flutter/fml/macros.h"
#include "impeller/playground/playground_test.h"
#include "third_party/skia/include/core/SkFont.h"

View File

@ -6,12 +6,10 @@
#include <memory>
#include "flutter/fml/macros.h"
#include "impeller/aiks/canvas_type.h"
#include "impeller/aiks/image.h"
#include "impeller/aiks/paint.h"
#include "impeller/core/sampler_descriptor.h"
#include "impeller/geometry/path.h"
namespace impeller {

View File

@ -8,6 +8,7 @@
#include <optional>
#include "flutter/fml/build_config.h"
#include "flutter/fml/macros.h"
#include "impeller/base/validation.h"
#include "impeller/core/formats.h"

View File

@ -14,6 +14,7 @@
#include "impeller/base/thread.h"
#include "impeller/base/validation.h"
#include "impeller/geometry/matrix.h"
#include "impeller/image/decompressed_image.h"
#include "impeller/scene/animation/animation_player.h"
#include "impeller/scene/importer/conversions.h"
#include "impeller/scene/importer/scene_flatbuffers.h"