fix a bug

This commit is contained in:
blueloveTH 2022-11-28 21:43:10 +08:00
parent 9a4eef6168
commit 8f29dcbca7

View File

@ -1097,7 +1097,7 @@ public:
} }
std::optional<_Str> readSharedStr(){ std::optional<_Str> readSharedStr(){
std::optional<_Str> copy = _sharedStr.value(); std::optional<_Str> copy = _sharedStr;
_sharedStr = {}; _sharedStr = {};
return copy; return copy;
} }
@ -1114,7 +1114,7 @@ public:
if(value == nullptr){ if(value == nullptr){
_sharedStr = {}; _sharedStr = {};
}else{ }else{
_sharedStr = value; _sharedStr = _Str(value);
} }
} }