Browse Source

Fix for formatting of serialization time

submodule
Trevor Irons 6 years ago
parent
commit
ef02fc95fe
2 changed files with 5 additions and 3 deletions
  1. 4
    2
      Modules/LemmaCore/include/LemmaObject.h
  2. 1
    1
      vim/lemma.cpp.template

+ 4
- 2
Modules/LemmaCore/include/LemmaObject.h View File

62
          *        all external classes that might need to be serialized.
62
          *        all external classes that might need to be serialized.
63
          */
63
          */
64
         virtual YAML::Node Serialize() const {
64
         virtual YAML::Node Serialize() const {
65
-            std::cout.precision( 21 );
65
+            std::cout.precision( 20 );
66
             YAML::Node node = YAML::Node();
66
             YAML::Node node = YAML::Node();
67
             node.SetTag( GetName() );
67
             node.SetTag( GetName() );
68
             std::time_t now = std::chrono::system_clock::to_time_t( std::chrono::system_clock::now() );
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
             node["Lemma_VERSION"] = LEMMA_VERSION;
72
             node["Lemma_VERSION"] = LEMMA_VERSION;
71
             return node;
73
             return node;
72
         };
74
         };

+ 1
- 1
vim/lemma.cpp.template View File

209
         // ====================  LIFECYCLE     =======================
209
         // ====================  LIFECYCLE     =======================
210
 
210
 
211
         /** Copy is disabled */
211
         /** Copy is disabled */
212
-        |CLASSNAME|( const CLASSNAME& ) = delete;
212
+        |CLASSNAME|( const |CLASSNAME|& ) = delete;
213
 
213
 
214
     	// ====================  DATA MEMBERS  =========================
214
     	// ====================  DATA MEMBERS  =========================
215
 
215
 

Loading…
Cancel
Save