Commit 7aeeb5c1 authored by Matt Glazar's avatar Matt Glazar Committed by Facebook Github Bot

Make TestLogHandler::getMessageValues const

Summary: I want to use TestLogHandler::getMessageValues with a const TestLogHandler reference. Mark getMessageValues as const so it can be called on a const TestLogHandler. getMessageValues doesn't mutate class state, so this should be safe.

Reviewed By: chadaustin

Differential Revision: D9815552

fbshipit-source-id: 275625d1a001fe536586229228eb2c9eee7e6330
parent 9c6832ee
......@@ -19,7 +19,7 @@
namespace folly {
std::vector<std::string> TestLogHandler::getMessageValues() {
std::vector<std::string> TestLogHandler::getMessageValues() const {
std::vector<std::string> values;
values.reserve(messages_.size());
for (const auto& msgInfo : messages_) {
......
......@@ -45,7 +45,7 @@ class TestLogHandler : public LogHandler {
return messages_;
}
std::vector<std::string> getMessageValues();
std::vector<std::string> getMessageValues() const;
void clearMessages() {
messages_.clear();
}
......
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