Make the i18n T function use std::string_view

Buildfixes, crashfixes

One more

Android buildfix

Buildfix Qt
This commit is contained in:
Henrik Rydgård committed 2024-02-12 18:44:39 +01:00
1 parent 9322b4c6dc
commit c5791764d8
135 files changed
+436 -486

No files matched your search

+5 -5
View File
@@ -189,7 +189,7 @@ std::string ViewGroup::DescribeText() const {
return ss.str();
}
std::string ViewGroup::DescribeListUnordered(const char *heading) const {
std::string ViewGroup::DescribeListUnordered(std::string_view heading) const {
std::stringstream ss;
ss << heading << "\n";
@@ -206,7 +206,7 @@ std::string ViewGroup::DescribeListUnordered(const char *heading) const {
return ss.str();
}
std::string ViewGroup::DescribeListOrdered(const char *heading) const {
std::string ViewGroup::DescribeListOrdered(std::string_view heading) const {
std::stringstream ss;
ss << heading << "\n";
@@ -973,7 +973,7 @@ void TabHolder::AddBack(UIScreen *parent) {
}
}
void TabHolder::AddTabContents(const std::string &title, View *tabContents) {
void TabHolder::AddTabContents(std::string_view title, View *tabContents) {
tabContents->ReplaceLayoutParams(new AnchorLayoutParams(FILL_PARENT, FILL_PARENT));
tabs_.push_back(tabContents);
tabStrip_->AddChoice(title);
@@ -1075,7 +1075,7 @@ ChoiceStrip::ChoiceStrip(Orientation orientation, LayoutParams *layoutParams)
SetSpacing(0.0f);
}
void ChoiceStrip::AddChoice(const std::string &title) {
void ChoiceStrip::AddChoice(std::string_view title) {
StickyChoice *c = new StickyChoice(title, "",
orientation_ == ORIENT_HORIZONTAL ?
nullptr :
@@ -1174,7 +1174,7 @@ StickyChoice *ChoiceStrip::Choice(int index) {
return nullptr;
}
CollapsibleSection::CollapsibleSection(const std::string &title, LayoutParams *layoutParams) : LinearLayout(ORIENT_VERTICAL, layoutParams) {
CollapsibleSection::CollapsibleSection(std::string_view title, LayoutParams *layoutParams) : LinearLayout(ORIENT_VERTICAL, layoutParams) {
open_ = &localOpen_;
SetSpacing(0.0f);