EHS/src/io/RIFF_Chunk.cpp
Karutoh bcd71cf2b5
All checks were successful
Build & Release / Windows-AMD64-Build (push) Successful in 1m8s
Build & Release / Linux-AMD64-Build (push) Successful in 1m30s
Build & Release / Linux-AARCH64-Build (push) Successful in 3m21s
Adjusted workflow.
2024-02-05 22:25:30 -08:00

52 lines
756 B
C++

#include "ehs/io/RIFF_Chunk.h"
namespace ehs
{
RIFF_Chunk::RIFF_Chunk()
: hashId(0)
{
}
RIFF_Chunk::RIFF_Chunk(const Str_8& id, const Serializer<>& data)
: id(id), hashId(id.Hash_64()), data(data)
{
}
Str_8 RIFF_Chunk::GetId() const
{
return id;
}
UInt_64 RIFF_Chunk::GetHashId() const
{
return hashId;
}
Serializer<> RIFF_Chunk::GetData() const
{
return data;
}
bool RIFF_Chunk::IsValid() const
{
return hashId;
}
RIFF_Chunk::RIFF_Chunk(const RIFF_Chunk& chunk)
: id(chunk.id), hashId(chunk.hashId), data(chunk.data)
{
}
RIFF_Chunk& RIFF_Chunk::operator=(const RIFF_Chunk& chunk)
{
if (this == &chunk)
return *this;
id = chunk.id;
hashId = chunk.hashId;
data = chunk.data;
return *this;
}
}