Skip to content

Commit

Permalink
Added emptiness check to the LogStream &operator<< with std::string_v…
Browse files Browse the repository at this point in the history
…iew (#2234)
  • Loading branch information
Demilivor authored Dec 19, 2024
1 parent 47f8af7 commit 3a6268f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/inc/drogon/utils/Utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,8 @@ namespace trantor
{
inline LogStream &operator<<(LogStream &ls, const std::string_view &v)
{
ls.append(v.data(), v.length());
if (!v.empty())
ls.append(v.data(), v.length());
return ls;
}

Expand Down

0 comments on commit 3a6268f

Please sign in to comment.