Commit 6794edc6 authored by Alex Guzman's avatar Alex Guzman Committed by Facebook GitHub Bot

Adjust PasswordCollector.describe() to return a const ref

Summary: This is mainly used for logging, and we can elide an unnecessary copy in some cases.

Reviewed By: mingtaoy

Differential Revision: D20402430

fbshipit-source-id: 79b73792a69cf2817ffb88b07d9973139c3c67bb
parent f4c6d8e6
......@@ -33,7 +33,7 @@ class PasswordInFile : public PasswordCollector {
return password_.c_str();
}
std::string describe() const override {
const std::string& describe() const override {
return fileName_;
}
......
......@@ -58,7 +58,7 @@ class PasswordCollector {
/**
* Return a description of this collector for logging purposes
*/
virtual std::string describe() const = 0;
virtual const std::string& describe() const = 0;
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment