Pass filename by reference when possible.
This commit is contained in:
@@ -99,7 +99,7 @@ std::string LLLogChat::timestamp(bool withdate)
|
||||
|
||||
|
||||
//static
|
||||
void LLLogChat::saveHistory(std::string filename, std::string line)
|
||||
void LLLogChat::saveHistory(std::string const& filename, std::string line)
|
||||
{
|
||||
if(!filename.size())
|
||||
{
|
||||
@@ -120,7 +120,7 @@ void LLLogChat::saveHistory(std::string filename, std::string line)
|
||||
}
|
||||
}
|
||||
|
||||
void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType,std::string,void*), void* userdata)
|
||||
void LLLogChat::loadHistory(std::string const& filename , void (*callback)(ELogLineType,std::string,void*), void* userdata)
|
||||
{
|
||||
if(!filename.size())
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#ifndef LL_LLLOGCHAT_H
|
||||
#define LL_LLLOGCHAT_H
|
||||
|
||||
#include <string>
|
||||
|
||||
class LLLogChat
|
||||
{
|
||||
public:
|
||||
@@ -44,9 +46,9 @@ public:
|
||||
LOG_END
|
||||
};
|
||||
static std::string timestamp(bool withdate = false);
|
||||
static std::string makeLogFileName(std::string(filename));
|
||||
static void saveHistory(std::string filename, std::string line);
|
||||
static void loadHistory(std::string filename,
|
||||
static std::string makeLogFileName(std::string filename);
|
||||
static void saveHistory(std::string const& filename, std::string line);
|
||||
static void loadHistory(std::string const& filename,
|
||||
void (*callback)(ELogLineType,std::string,void*),
|
||||
void* userdata);
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user