From 944e2b6a9d8ee97c3202ac0403edec234d0bfa31 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 24 Apr 2023 10:37:48 -0700 Subject: More tweaks to make things easier to transition. --- src/unstable/blob.cpp | 4 ++-- src/unstable/blob.h | 2 ++ src/unstable/utfstring.cpp | 5 +++-- src/unstable/utfstring.h | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/unstable') diff --git a/src/unstable/blob.cpp b/src/unstable/blob.cpp index c4148e1..213a1ec 100644 --- a/src/unstable/blob.cpp +++ b/src/unstable/blob.cpp @@ -811,7 +811,7 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &rOut, const Bu::Blob &b ) return rOut; } -Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Bu::Blob &b ) +Bu::ArchiveBase &Bu::operator<<( Bu::ArchiveBase &ar, const Bu::Blob &b ) { int32_t iSize = b.getSize(); ar << iSize; @@ -819,7 +819,7 @@ Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Bu::Blob &b ) return ar; } -Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Bu::Blob &b ) +Bu::ArchiveBase &Bu::operator>>( Bu::ArchiveBase &ar, Bu::Blob &b ) { int32_t iSize; ar >> iSize; diff --git a/src/unstable/blob.h b/src/unstable/blob.h index dfddb02..8f948e2 100644 --- a/src/unstable/blob.h +++ b/src/unstable/blob.h @@ -31,6 +31,8 @@ namespace Bu */ class Blob { + friend ArchiveBase &operator<<( ArchiveBase &ar, const Blob &s ); + friend ArchiveBase &operator>>( ArchiveBase &ar, Blob &s ); public: class iterator; class const_iterator; diff --git a/src/unstable/utfstring.cpp b/src/unstable/utfstring.cpp index 6217f80..13a6046 100644 --- a/src/unstable/utfstring.cpp +++ b/src/unstable/utfstring.cpp @@ -729,11 +729,12 @@ bool Bu::UtfString::operator>=( const Bu::UtfString &rhs ) const return false; } -Bu::Blob Bu::UtfString::get( Encoding eEnc ) const +Bu::String Bu::UtfString::get( Encoding eEnc ) const { Bu::MemBuf mb; write( mb, eEnc ); - return Bu::Blob( mb.getString().getStr(), mb.getString().getSize() ); + //return Bu::Blob( mb.getString().getStr(), mb.getString().getSize() ); + return Bu::String( mb.getString().getStr(), mb.getString().getSize() ); } void Bu::UtfString::debug() const diff --git a/src/unstable/utfstring.h b/src/unstable/utfstring.h index 3c64a75..5355f3e 100644 --- a/src/unstable/utfstring.h +++ b/src/unstable/utfstring.h @@ -216,7 +216,7 @@ namespace Bu * a binary Bu::Blob. Like write, this also includes the proper BOM * at the begining. */ - Bu::Blob get( Encoding eEnc=Utf8 ) const; + Bu::String get( Encoding eEnc=Utf8 ) const; void debug() const; -- cgit v1.2.3