* imc_channel, imc_raw: optimize with pass by reference

* imc_object: asc_time, localtime: make threadsafe
* imc_datatype: satisfy 'rule of two'
* python: remove all unused imports
This commit is contained in:
2021-05-05 13:28:11 +02:00
parent 72378877ec
commit 83922c343f
9 changed files with 27 additions and 17 deletions

View File

@@ -70,6 +70,21 @@ namespace imc
// identify type
short int& dtype() { return dtidx_; }
// copy constructor
datatype(const datatype &num)
{
this->ubyte_ = num.ubyte_;
this->sbyte_ = num.sbyte_;
this->ushort_ = num.ushort_;
this->sshort_ = num.sshort_;
this->ulint_ = num.ulint_;
this->slint_ = num.slint_;
this->sfloat_ = num.sfloat_;
this->sdouble_ = num.sdouble_;
this->sdigital_ = num.sdigital_;
this->dtidx_ = num.dtidx_;
}
// overall assignment operator
datatype& operator=(const datatype &num)
{