Skip to content

Commit

Permalink
Avoid instantiating a string if we don't have to
Browse files Browse the repository at this point in the history
  • Loading branch information
Epixu committed Jun 3, 2024
1 parent 8b56ed2 commit ecdeaa4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/HTML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using namespace Langulus::Logger;

/// Create an HTML file duplicator/redirector
/// @param filename - the relative filename of the log file
ToHTML::ToHTML(const std::string& filename) : mFilename {filename} {
ToHTML::ToHTML(const TextView& filename) : mFilename {filename} {
mFile.open(mFilename, std::ios::out | std::ios::trunc);
if (not mFile)
throw std::runtime_error {"Can't open log file"};
Expand Down
2 changes: 1 addition & 1 deletion source/Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ namespace Langulus::Logger
void WriteHeader() const;

public:
LANGULUS_API(LOGGER) ToHTML(const std::string&);
LANGULUS_API(LOGGER) ToHTML(const TextView&);
LANGULUS_API(LOGGER) ~ToHTML();

LANGULUS_API(LOGGER) void Write(const TextView&) const noexcept;
Expand Down

0 comments on commit ecdeaa4

Please sign in to comment.