Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions impeller/archivist/archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ArchiveDatabase;

class Archive {
public:
Archive(const std::string& path);
explicit Archive(const std::string& path);

~Archive();

Expand All @@ -45,7 +45,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);
}
Expand Down
2 changes: 1 addition & 1 deletion impeller/archivist/archive_database.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct ArchiveDef;
///
class ArchiveDatabase {
public:
ArchiveDatabase(const std::string& filename);
explicit ArchiveDatabase(const std::string& filename);

~ArchiveDatabase();

Expand Down
2 changes: 1 addition & 1 deletion impeller/archivist/archive_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ArchiveVector : public Archivable {

ArchiveVector();

ArchiveVector(std::vector<int64_t> keys);
explicit ArchiveVector(std::vector<int64_t> keys);

ArchiveVector(const ArchiveVector&) = delete;

Expand Down
2 changes: 1 addition & 1 deletion impeller/compiler/compiler_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct CompilerBackend {

spirv_cross::Compiler* GetCompiler();

operator bool() const;
explicit operator bool() const;

enum class ExtendedResourceIndex {
kPrimary,
Expand Down
2 changes: 1 addition & 1 deletion impeller/compiler/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace compiler {

class AutoLogger {
public:
AutoLogger(std::stringstream& logger) : logger_(logger) {}
explicit AutoLogger(std::stringstream& logger) : logger_(logger) {}

~AutoLogger() {
logger_ << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion impeller/core/vertex_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class TextureFilterInput final : public FilterInput {
Matrix GetLocalTransform(const Entity& entity) const override;

private:
TextureFilterInput(std::shared_ptr<Texture> texture,
Matrix local_transform = Matrix());
explicit TextureFilterInput(std::shared_ptr<Texture> texture,
Matrix local_transform = Matrix());

std::shared_ptr<Texture> texture_;
Matrix local_transform_;
Expand Down