To avoid unnecessary heap allocation.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
}
-std::string LogEvent::get_type_str() const
+std::string_view LogEvent::get_type_str() const
{
switch(_type) {
case EVENT_SUBTREEMAP: return "SUBTREEMAP";
LogEvent& operator=(const LogEvent&) = delete;
virtual ~LogEvent() {}
- string get_type_str() const;
+ std::string_view get_type_str() const;
static EventType str_to_type(std::string_view str);
EventType get_type() const { return _type; }
void set_type(EventType t) { _type = t; }