GlobalVariable.cpp__ 846 B

123456789101112131415161718192021222324252627282930313233
  1. #include "GlobalVariable.h"
  2. #include "spdlog/spdlog.h"
  3. #include <QFile>
  4. /* =========================================================================================
  5. * 计算线程信息结构体
  6. * =========================================================================================*/
  7. CalculateThreadInfo_t::CalculateThreadInfo_t(const CalculateThreadInfo_t& info)
  8. {
  9. *this = info; // 使用赋值运算符进行深拷贝
  10. }
  11. CalculateThreadInfo_t& CalculateThreadInfo_t::operator=(const CalculateThreadInfo_t& info)
  12. {
  13. if(&info == this)
  14. {
  15. return *this; // 防止自赋值
  16. }
  17. CompareItemID = info.CompareItemID;
  18. strCompareItemName = info.strCompareItemName;
  19. vecRoad = info.vecRoad;
  20. threadState = info.threadState;
  21. threadType = info.threadType;
  22. pThread = info.pThread;
  23. return *this;
  24. }