瀏覽代碼

Fix for formatting of serialization time

submodule
Trevor Irons 7 年之前
父節點
當前提交
ef02fc95fe
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 4
    2
      Modules/LemmaCore/include/LemmaObject.h
  2. 1
    1
      vim/lemma.cpp.template

+ 4
- 2
Modules/LemmaCore/include/LemmaObject.h 查看文件

@@ -62,11 +62,13 @@ class LemmaObject {
62 62
          *        all external classes that might need to be serialized.
63 63
          */
64 64
         virtual YAML::Node Serialize() const {
65
-            std::cout.precision( 21 );
65
+            std::cout.precision( 20 );
66 66
             YAML::Node node = YAML::Node();
67 67
             node.SetTag( GetName() );
68 68
             std::time_t now = std::chrono::system_clock::to_time_t( std::chrono::system_clock::now() );
69
-            node["Serialized"] = std::ctime(&now);
69
+            std::string ser_time =  std::string( std::ctime(&now) );
70
+            ser_time.pop_back();
71
+            node["Serialized"] = ser_time;
70 72
             node["Lemma_VERSION"] = LEMMA_VERSION;
71 73
             return node;
72 74
         };

+ 1
- 1
vim/lemma.cpp.template 查看文件

@@ -209,7 +209,7 @@ class |?CLASSNAME:c| : public |BASECLASS:c| {
209 209
         // ====================  LIFECYCLE     =======================
210 210
 
211 211
         /** Copy is disabled */
212
-        |CLASSNAME|( const CLASSNAME& ) = delete;
212
+        |CLASSNAME|( const |CLASSNAME|& ) = delete;
213 213
 
214 214
     	// ====================  DATA MEMBERS  =========================
215 215
 

Loading…
取消
儲存