aboutsummaryrefslogtreecommitdiffstats
path: root/source/DataFormatters/FormattersHelpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/DataFormatters/FormattersHelpers.cpp')
-rw-r--r--source/DataFormatters/FormattersHelpers.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/source/DataFormatters/FormattersHelpers.cpp b/source/DataFormatters/FormattersHelpers.cpp
index 8f007df03faa..b2a5a17595c8 100644
--- a/source/DataFormatters/FormattersHelpers.cpp
+++ b/source/DataFormatters/FormattersHelpers.cpp
@@ -29,10 +29,10 @@ void lldb_private::formatters::AddFormat(
if (regex)
category_sp->GetRegexTypeFormatsContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
- format_sp);
+ RegularExpression(type_name.GetStringRef()), format_sp);
else
- category_sp->GetTypeFormatsContainer()->Add(type_name, format_sp);
+ category_sp->GetTypeFormatsContainer()->Add(std::move(type_name),
+ format_sp);
}
void lldb_private::formatters::AddSummary(
@@ -40,10 +40,10 @@ void lldb_private::formatters::AddSummary(
ConstString type_name, bool regex) {
if (regex)
category_sp->GetRegexTypeSummariesContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
- summary_sp);
+ RegularExpression(type_name.GetStringRef()), summary_sp);
else
- category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
+ category_sp->GetTypeSummariesContainer()->Add(std::move(type_name),
+ summary_sp);
}
void lldb_private::formatters::AddStringSummary(
@@ -53,10 +53,10 @@ void lldb_private::formatters::AddStringSummary(
if (regex)
category_sp->GetRegexTypeSummariesContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
- summary_sp);
+ RegularExpression(type_name.GetStringRef()), summary_sp);
else
- category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
+ category_sp->GetTypeSummariesContainer()->Add(std::move(type_name),
+ summary_sp);
}
void lldb_private::formatters::AddOneLineSummary(
@@ -67,10 +67,10 @@ void lldb_private::formatters::AddOneLineSummary(
if (regex)
category_sp->GetRegexTypeSummariesContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
- summary_sp);
+ RegularExpression(type_name.GetStringRef()), summary_sp);
else
- category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
+ category_sp->GetTypeSummariesContainer()->Add(std::move(type_name),
+ summary_sp);
}
void lldb_private::formatters::AddCXXSummary(
@@ -81,10 +81,10 @@ void lldb_private::formatters::AddCXXSummary(
new CXXFunctionSummaryFormat(flags, funct, description));
if (regex)
category_sp->GetRegexTypeSummariesContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
- summary_sp);
+ RegularExpression(type_name.GetStringRef()), summary_sp);
else
- category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
+ category_sp->GetTypeSummariesContainer()->Add(std::move(type_name),
+ summary_sp);
}
void lldb_private::formatters::AddCXXSynthetic(
@@ -96,10 +96,10 @@ void lldb_private::formatters::AddCXXSynthetic(
new CXXSyntheticChildren(flags, description, generator));
if (regex)
category_sp->GetRegexTypeSyntheticsContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
- synth_sp);
+ RegularExpression(type_name.GetStringRef()), synth_sp);
else
- category_sp->GetTypeSyntheticsContainer()->Add(type_name, synth_sp);
+ category_sp->GetTypeSyntheticsContainer()->Add(std::move(type_name),
+ synth_sp);
}
void lldb_private::formatters::AddFilter(
@@ -111,10 +111,10 @@ void lldb_private::formatters::AddFilter(
filter_sp->AddExpressionPath(child);
if (regex)
category_sp->GetRegexTypeFiltersContainer()->Add(
- RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
- filter_sp);
+ RegularExpression(type_name.GetStringRef()), filter_sp);
else
- category_sp->GetTypeFiltersContainer()->Add(type_name, filter_sp);
+ category_sp->GetTypeFiltersContainer()->Add(std::move(type_name),
+ filter_sp);
}
size_t lldb_private::formatters::ExtractIndexFromString(const char *item_name) {