mirror of https://github.com/odrling/Aegisub
Replace some const strings with const references to strings
Originally committed to SVN as r5815.
This commit is contained in:
parent
05059732f9
commit
ba2794b2fe
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue