*Outstream non member function fix. 4.x-dev

Fri, 30 Oct 2020 08:24:17 +0200

author
Luca Tonini
date
Fri, 30 Oct 2020 08:24:17 +0200
branch
4.x-dev
changeset 1473
71d5c7c0628b
parent 1472
3ab474a95f5a
child 1474
5ed81f9f7516

*Outstream non member function fix.

Source/Gorgon/Time.h file | annotate | diff | comparison | revisions
--- a/Source/Gorgon/Time.h	Fri Oct 30 01:07:43 2020 +0200
+++ b/Source/Gorgon/Time.h	Fri Oct 30 08:24:17 2020 +0200
@@ -178,16 +178,6 @@
 			/// Compares 2 dates
             bool operator == (const Date &other) const;
             
-            /// Output stream operator overload 
-            std::ostream &operator << (std::ostream &out){
-                if(timezone){
-                    out<<ISODateTime(timezone);
-                }else
-                    out<<ISODate();
-                    
-                return out;
-            }
-            
             /// Unsets the stored time
 			void Unset() {
 				Year=0;
@@ -234,6 +224,16 @@
 			int Timezone;
 		};
 		
+        /// Output stream operator overload 
+        std::ostream &operator << (std::ostream &out, const Date &date) {
+            if(timezone){
+                out<<date.ISODateTime(timezone);
+            }else
+                out<<date.ISODate();
+                    
+            return out;
+        }
+        
 		/// Returns current time in milliseconds. 
 		/// @warning FrameStart should be used unless exact time is required.
 		/// This function works slower and changes during a frame, which may

mercurial