Skip to content

Commit

Permalink
Migrating to C++20.
Browse files Browse the repository at this point in the history
  • Loading branch information
shin1m committed Feb 15, 2024
1 parent f8aaa7f commit 43437e4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions include/xemmai/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ class t_string
{
return v_size == a_x.v_size && std::char_traits<wchar_t>::compare(*this, a_x, v_size) == 0;
}
bool operator!=(const t_string& a_x) const
{
return !(*this == a_x);
}
int f_compare(const t_string& a_x) const
{
int n = std::char_traits<wchar_t>::compare(*this, a_x, std::min(v_size, a_x.v_size));
Expand Down
4 changes: 0 additions & 4 deletions include/xemmai/value.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,6 @@ class t_value : public T_tag
return true;
}
}
bool operator!=(const t_value<t_pointer>& a_value) const
{
return !operator==(a_value);
}
uintptr_t f_tag() const
{
return reinterpret_cast<uintptr_t>(static_cast<t_object*>(*this));
Expand Down
2 changes: 1 addition & 1 deletion src/type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ std::pair<std::vector<std::pair<t_root, t_rvalue>>, std::map<t_object*, size_t>>
std::vector<std::pair<t_root, t_rvalue>> fields{f_fields(), f_fields() + v_instance_fields};
std::map<t_object*, size_t> key2index{f_key2index(), f_key2index() + v_fields};
for (auto& x : a_fields.v_instance) {
if (key2index.find(x) != key2index.end()) f_throw(x->f_as<t_symbol>().f_string());
if (key2index.contains(x)) f_throw(x->f_as<t_symbol>().f_string());
key2index.emplace(x, fields.size());
fields.emplace_back(x, nullptr);
}
Expand Down

0 comments on commit 43437e4

Please sign in to comment.