Make errnoStr return std::string instead of fbstring

Summary:
The result of `errnoStr` is often converted to `std::string` so returning `fbstring` adds an extra copy. Make it return `std::string` instead. This will also allow removing dependency between `String.h` and `FBString.h`.

(Note: this ignores all push blocking failures!)

Reviewed By: yfeldblum

Differential Revision: D20195395

fbshipit-source-id: 0dc65f1566911156be3fcb715dd105c58f2a8822
This commit is contained in:
Victor Zverovich 2020-03-10 10:45:15 -07:00 committed by Facebook Github Bot
parent ce2a78988c
commit 639073cdd0

View File

@ -57,10 +57,9 @@ std::string InodeError::computeMessage() const {
}
if (message_.empty()) {
return path + ": " + folly::errnoStr(errnum()).toStdString();
return path + ": " + folly::errnoStr(errnum());
}
return path + ": " + message_ + ": " +
folly::errnoStr(errnum()).toStdString();
return path + ": " + message_ + ": " + folly::errnoStr(errnum());
}
} // namespace eden
} // namespace facebook