mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-13 06:11:12 +01:00
Fixed more cases of using String.size() instead of String.length().
This commit is contained in:
parent
27920ca1a7
commit
2591231bbe
@ -863,7 +863,7 @@ HTMLBuilder *HTMLTag::f() {
|
||||
}
|
||||
|
||||
bool HTMLTag::has_data() {
|
||||
return result.size() > 0;
|
||||
return result.length() > 0;
|
||||
}
|
||||
|
||||
HTMLTag::HTMLTag() {
|
||||
|
@ -887,7 +887,7 @@ Ref<_HTMLBuilder> _HTMLTag::f() {
|
||||
}
|
||||
|
||||
bool _HTMLTag::has_data() {
|
||||
return result.size() > 0;
|
||||
return result.length() > 0;
|
||||
}
|
||||
|
||||
_HTMLTag::_HTMLTag() {
|
||||
|
@ -131,7 +131,7 @@ String HTMLPaginator::_render_indexed(Ref<HTMLPaginator> target, const int page_
|
||||
}
|
||||
|
||||
String s = target->base_url;
|
||||
if (s.size() > 0 && s[s.size() - 1] != '/') {
|
||||
if (s.length() > 0 && s[s.length() - 1] != '/') {
|
||||
s += '/';
|
||||
}
|
||||
|
||||
@ -221,7 +221,7 @@ String HTMLPaginator::_render_links(Ref<HTMLPaginator> target, const int page_in
|
||||
}
|
||||
|
||||
String s = target->base_url;
|
||||
if (s.size() > 0 && s[s.size() - 1] != '/') {
|
||||
if (s.length() > 0 && s[s.length() - 1] != '/') {
|
||||
s += '/';
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ String HTMLPaginator::_render_links(Ref<HTMLPaginator> target, const int page_in
|
||||
|
||||
String HTMLPaginator::get_pagination_old(const String &base_url, const int max, const int current_index, const int max_visible_links) {
|
||||
String s = base_url;
|
||||
if (s.size() > 0 && s[s.size() - 1] != '/') {
|
||||
if (s.length() > 0 && s[s.length() - 1] != '/') {
|
||||
s += '/';
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ String HTMLPaginator::get_pagination_old(const String &base_url, const int max,
|
||||
|
||||
String HTMLPaginator::get_pagination_links_old(const String &base_url, const Vector<String> &links, const int current_index, const int max_visible_links) {
|
||||
String s = base_url;
|
||||
if (s.size() > 0 && s[s.size() - 1] != '/') {
|
||||
if (s.length() > 0 && s[s.length() - 1] != '/') {
|
||||
s += '/';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user