Better DcId logging.

GitOrigin-RevId: b1fe45b3ecd06ca6869a60124078930b2129b972
This commit is contained in:
levlam 2019-05-09 05:01:45 +03:00
parent 88febd4aa0
commit c2a370262c
2 changed files with 7 additions and 3 deletions

View File

@ -269,7 +269,7 @@ class FullRemoteFileLocation {
static constexpr int32 FILE_REFERENCE_FLAG = 1 << 25;
bool web_location_flag_{false};
DcId dc_id_;
std::string file_reference_;
string file_reference_;
enum class LocationType : int32 { Web, Photo, Common, None };
Variant<WebRemoteFileLocation, PhotoRemoteFileLocation, CommonRemoteFileLocation> variant_;
@ -395,7 +395,7 @@ class FullRemoteFileLocation {
}
}
void clear_file_reference() {
file_reference_ = "";
file_reference_.clear();
}
bool delete_file_reference(Slice bad_file_reference) {

View File

@ -88,8 +88,12 @@ class DcId {
inline StringBuilder &operator<<(StringBuilder &sb, const DcId &dc_id) {
sb << "DcId{";
if (dc_id.is_empty()) {
if (dc_id == DcId::invalid()) {
sb << "invalid";
} else if (dc_id == DcId()) {
sb << "empty";
} else if (dc_id.is_empty()) {
sb << "is_empty";
} else if (dc_id.is_main()) {
sb << "main";
} else {