summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-06 20:22:23 +0200
committerCarl Hetherington <cth@carlh.net>2020-07-11 01:28:41 +0200
commit656e22f15d25fbdfd071047c87493a5a148eda6c (patch)
tree70debb64cfba8dc6bb52aee920683a9e285d4a1a /src
parent31ace7591005675b514cc534762f91e576c69424 (diff)
Move copy construction of Raw up to ByteString to fix warning when Raw(Raw&) does not call its parent class.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/KM_util.h12
-rwxr-xr-xsrc/MXFTypes.h9
2 files changed, 10 insertions, 11 deletions
diff --git a/src/KM_util.h b/src/KM_util.h
index f6a8935..9dcf846 100755
--- a/src/KM_util.h
+++ b/src/KM_util.h
@@ -512,8 +512,6 @@ namespace Kumu
//
class ByteString : public IArchive
{
- KM_NO_COPY_CONSTRUCT(ByteString);
-
protected:
byte_t* m_Data; // pointer to memory area containing frame data
ui32_t m_Capacity; // size of memory area pointed to by m_Data
@@ -521,9 +519,19 @@ namespace Kumu
public:
ByteString();
+ ByteString(const ByteString& rhs) { Copy(rhs); }
ByteString(ui32_t cap);
virtual ~ByteString();
+ const ByteString& operator=(const ByteString& rhs) { Copy(rhs); return *this; }
+
+ void Copy(const ByteString& rhs) {
+ if ( KM_SUCCESS(Capacity(rhs.Length())) )
+ {
+ Set(rhs);
+ }
+ }
+
// Sets or resets the size of the internally allocated buffer.
Result_t Capacity(ui32_t cap);
diff --git a/src/MXFTypes.h b/src/MXFTypes.h
index 555408d..0f38e9d 100755
--- a/src/MXFTypes.h
+++ b/src/MXFTypes.h
@@ -674,17 +674,8 @@ namespace ASDCP
{
public:
Raw();
- Raw(const Raw& rhs) { Copy(rhs); }
virtual ~Raw();
- const Raw& operator=(const Raw& rhs) { Copy(rhs); return *this; }
- void Copy(const Raw& rhs) {
- if ( KM_SUCCESS(Capacity(rhs.Length())) )
- {
- Set(rhs);
- }
- }
-
//
virtual bool Unarchive(Kumu::MemIOReader* Reader);
virtual bool Archive(Kumu::MemIOWriter* Writer) const;