summaryrefslogtreecommitdiff
path: root/absl/strings/cord.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/strings/cord.h')
-rw-r--r--absl/strings/cord.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/absl/strings/cord.h b/absl/strings/cord.h
index 1349b115..8744ec58 100644
--- a/absl/strings/cord.h
+++ b/absl/strings/cord.h
@@ -815,7 +815,7 @@ class Cord {
InlineRep& operator=(const InlineRep& src);
InlineRep& operator=(InlineRep&& src) noexcept;
- explicit constexpr InlineRep(cord_internal::InlineData data);
+ explicit constexpr InlineRep(absl::string_view sv, CordRep* rep);
void Swap(InlineRep* rhs);
bool empty() const;
@@ -1106,8 +1106,8 @@ Cord MakeCordFromExternal(absl::string_view data, Releaser&& releaser) {
return cord;
}
-constexpr Cord::InlineRep::InlineRep(cord_internal::InlineData data)
- : data_(data) {}
+constexpr Cord::InlineRep::InlineRep(absl::string_view sv, CordRep* rep)
+ : data_(sv, rep) {}
inline Cord::InlineRep::InlineRep(const Cord::InlineRep& src)
: data_(InlineData::kDefaultInit) {
@@ -1267,13 +1267,12 @@ inline Cord::Cord(absl::string_view src)
template <typename T>
constexpr Cord::Cord(strings_internal::StringConstant<T>)
- : contents_(strings_internal::StringConstant<T>::value.size() <=
+ : contents_(strings_internal::StringConstant<T>::value,
+ strings_internal::StringConstant<T>::value.size() <=
cord_internal::kMaxInline
- ? cord_internal::InlineData(
- strings_internal::StringConstant<T>::value)
- : cord_internal::InlineData(
- &cord_internal::ConstInitExternalStorage<
- strings_internal::StringConstant<T>>::value)) {}
+ ? nullptr
+ : &cord_internal::ConstInitExternalStorage<
+ strings_internal::StringConstant<T>>::value) {}
inline Cord& Cord::operator=(const Cord& x) {
contents_ = x.contents_;