diff --git a/src/KKdLib/dsc.cpp b/src/KKdLib/dsc.cpp index 29928445..9436bba5 100644 --- a/src/KKdLib/dsc.cpp +++ b/src/KKdLib/dsc.cpp @@ -3283,6 +3283,15 @@ bool dsc::load_file(void* data, const char* path, const char* file, uint32_t has return ret; } +dsc& dsc::operator=(const dsc& d) { + type = d.type; + signature = d.signature; + id = d.id; + data.assign(d.data.begin(), d.data.end()); + data_buffer.assign(d.data_buffer.begin(), d.data_buffer.end()); + return *this; +} + dsc_replace::dsc_replace(dsc_type src_type, dsc_type dst_type, bool dst_has_perf_id) : src_type(DSC_FT), dst_type(DSC_FT), replace_data() { diff --git a/src/KKdLib/dsc.hpp b/src/KKdLib/dsc.hpp index dfad43b5..56e531f2 100644 --- a/src/KKdLib/dsc.hpp +++ b/src/KKdLib/dsc.hpp @@ -309,6 +309,8 @@ struct dsc { static int32_t calculate_target_flying_time(int32_t bpm, int32_t time_signature); static bool load_file(void* data, const char* path, const char* file, uint32_t hash); + + dsc& operator=(const dsc& d); }; struct dsc_replace_data {