Skip to content

Commit

Permalink
Remove unnecessary static_pointer_cast for TagTemplates
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianOpeni committed Nov 26, 2024
1 parent a5140c2 commit b64788f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/perfdata/elasticsearchwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,7 @@ void ElasticsearchWriter::AddTemplateTags(const Dictionary::Ptr& fields, const C
Service::Ptr service;
tie(host, service) = GetHostService(checkable);

Dictionary::Ptr tmpl;
if (service) {
if (GetServiceTagsTemplate()) {
tmpl = static_pointer_cast<Dictionary>(GetServiceTagsTemplate()->ShallowClone());
}
} else if (GetHostTagsTemplate()) {
tmpl = static_pointer_cast<Dictionary>(GetHostTagsTemplate()->ShallowClone());
}
Dictionary::Ptr tmpl = service ? GetServiceTagsTemplate() : GetHostTagsTemplate();

if (tmpl) {
MacroProcessor::ResolverList resolvers;
Expand Down

0 comments on commit b64788f

Please sign in to comment.