Replace some const strings with const references to strings

Originally committed to SVN as r5815.
This commit is contained in:
Thomas Goyne 2011-11-04 19:42:21 +00:00
parent 05059732f9
commit ba2794b2fe
4 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ std::string Detect(const std::string &file) {
return ucd.Single(); return ucd.Single();
} }
void DetectAll(const std::string file, CharsetListDetected &list) { void DetectAll(const std::string& file, CharsetListDetected &list) {
UCDetect ucd(file); UCDetect ucd(file);
ucd.List(list); ucd.List(list);
} }

View File

@ -63,7 +63,7 @@ SinkMessage::~SinkMessage() {
} }
LogSink::LogSink(const std::string dir_log): dir_log(dir_log) { LogSink::LogSink(const std::string& dir_log): dir_log(dir_log) {
util::time_log(time_start); util::time_log(time_start);
} }

View File

@ -36,10 +36,10 @@ DEFINE_SIMPLE_EXCEPTION_NOINNER(UnknownCharset, CharsetError, "charset/unknown")
/// List of detected encodings. /// List of detected encodings.
typedef std::map<float, std::string, std::greater_equal<float> > CharsetListDetected; typedef std::map<float, std::string, std::greater_equal<float> > CharsetListDetected;
/// @brief Return a complete list of detected character sets ordered by precidence. /// @brief Return a complete list of detected character sets ordered by precedence.
/// @param file File to check /// @param file File to check
/// @param[out] list Map to load detected list into. /// @param[out] list Map to load detected list into.
void DetectAll(const std::string file, CharsetListDetected &list); void DetectAll(const std::string &file, CharsetListDetected &list);
/// @brief Returns the character set with the highest confidence /// @brief Returns the character set with the highest confidence
/// @param file File to check /// @param file File to check

View File

@ -120,7 +120,7 @@ class LogSink {
public: public:
/// Constructor /// Constructor
/// @param dir_log Directory to place log files. /// @param dir_log Directory to place log files.
LogSink(const std::string dir_log); LogSink(const std::string &dir_log);
/// Destructor /// Destructor
~LogSink(); ~LogSink();