Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[misc] Fix a few compilation warnings #5325

Merged
merged 1 commit into from
Jul 5, 2022
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
2 changes: 1 addition & 1 deletion taichi/codegen/spirv/lib_tiny_ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Polymorphic {
return typeid(*this) == typeid(other) && is_equal(other);
}

const bool equals(const Polymorphic *other) const {
bool equals(const Polymorphic *other) const {
return (*this) == (*other);
}

Expand Down
2 changes: 1 addition & 1 deletion taichi/ir/statements.h
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ class ConstStmt : public Stmt {
explicit ConstStmt(const LaneAttribute<TypedConstant> &val) : val(val) {
TI_ASSERT(val.size() == 1); // TODO: support vectorized case
ret_type = val[0].dt;
for (int i = 0; i < val.size(); i++) {
for (std::size_t i = 0; i < val.size(); i++) {
TI_ASSERT(val[0].dt == val[i].dt);
}
TI_STMT_REG_FIELDS;
Expand Down