Replace size() == 0 with is_empty().
This commit is contained in:
parent
c7ea8614d7
commit
4f4031a675
147 changed files with 300 additions and 300 deletions
|
|
@ -350,7 +350,7 @@ void NodePath::simplify() {
|
|||
data->path.remove_at(i - 1);
|
||||
data->path.remove_at(i - 1);
|
||||
i -= 2;
|
||||
if (data->path.size() == 0) {
|
||||
if (data->path.is_empty()) {
|
||||
data->path.push_back(".");
|
||||
break;
|
||||
}
|
||||
|
|
@ -366,7 +366,7 @@ NodePath NodePath::simplified() const {
|
|||
}
|
||||
|
||||
NodePath::NodePath(const Vector<StringName> &p_path, bool p_absolute) {
|
||||
if (p_path.size() == 0 && !p_absolute) {
|
||||
if (p_path.is_empty() && !p_absolute) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -378,7 +378,7 @@ NodePath::NodePath(const Vector<StringName> &p_path, bool p_absolute) {
|
|||
}
|
||||
|
||||
NodePath::NodePath(const Vector<StringName> &p_path, const Vector<StringName> &p_subpath, bool p_absolute) {
|
||||
if (p_path.size() == 0 && p_subpath.size() == 0 && !p_absolute) {
|
||||
if (p_path.is_empty() && p_subpath.is_empty() && !p_absolute) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) {
|
|||
const Vector<Pair<int, CharString>> &b = buckets[i];
|
||||
HashMap<uint32_t, int> &t = table.write[i];
|
||||
|
||||
if (b.size() == 0) {
|
||||
if (b.is_empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) {
|
|||
|
||||
for (int i = 0; i < size; i++) {
|
||||
const HashMap<uint32_t, int> &t = table[i];
|
||||
if (t.size() == 0) {
|
||||
if (t.is_empty()) {
|
||||
htw[i] = 0xFFFFFFFF; //nothing
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3298,7 +3298,7 @@ int String::findmk(const Vector<String> &p_keys, int p_from, int *r_key) const {
|
|||
if (p_from < 0) {
|
||||
return -1;
|
||||
}
|
||||
if (p_keys.size() == 0) {
|
||||
if (p_keys.is_empty()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue