| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 75669e9 commit 0695151
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ namespace node { | |||
| 7 | 7 | ||
| 8 | 8 | template <typename T> | |
| 9 | 9 | T* CopyOnWrite<T>::write() { | |
| 10 | - if (!data_.unique()) { | ||
| 10 | + if (data_.use_count() > 1l) { | ||
| 11 | 11 | data_ = std::make_shared<T>(*data_); | |
| 12 | 12 | } | |
| 13 | 13 | return data_.get(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments