Ver código fonte

更新 'robot/robotics/datetime.hpp'

添加支持int类型的赋值操作,背景:为解决orm.hpp中有赋值int类型的操作编译时报错
xuyiyu 1 dia atrás
pai
commit
b597132046
1 arquivos alterados com 9 adições e 0 exclusões
  1. 9 0
      robot/robotics/datetime.hpp

+ 9 - 0
robot/robotics/datetime.hpp

@@ -265,6 +265,15 @@ namespace robotics {
 				time_stamp_ = time;
 				return *this;
 			}
+          	/**
+			 * @brief 赋值
+			 * @param time
+			 * @return
+			 */
+			datetime& operator=(const int& time) {
+				time_stamp_ = time;
+				return *this;
+			}
 			/**
 			 * @brief 相减
 			 * @param value