• R/O
  • SSH
  • HTTPS

eirrepo: Commit


Commit MetaInfo

Revision64 (tree)
Time2018-02-08 06:02:37
Authorquiret

Log Message

- fixes to please the GCC compiler

Change Summary

Incremental Difference

--- mta/logic/LuaManager.h (revision 63)
+++ mta/logic/LuaManager.h (revision 64)
@@ -129,7 +129,7 @@
129129 }
130130
131131 public:
132- env_status( lua_State& lua, const LuaMain& context ) : m_lua( lua ), m_env( context )
132+ env_status( lua_State& lua, const LuaMain& context ) : m_env( context ), m_lua( lua )
133133 {
134134 m_frozen = false;
135135 m_functionEnter = std::chrono::system_clock::now();
--- mta/logic/networking/NetworkStruct.h (revision 63)
+++ mta/logic/networking/NetworkStruct.h (revision 64)
@@ -78,7 +78,10 @@
7878 };
7979
8080 #define NETWORK_NULL_DATA \
81- template <class type> NET_FAST void NetworkRead( const unsigned int n, type& val ) const { return; } \
81+ template <class type> NET_FAST void NetworkRead( const unsigned int n, type& val ) const \
82+ { \
83+ val = type(); \
84+ } \
8285 template <class type> NET_FAST void NetworkWrite( const unsigned int n, const type& val ) { return; }
8386
8487 struct NetworkDataType
@@ -130,9 +133,9 @@
130133
131134 m_streamer.ForwardID();
132135 }
133-
136+
137+ const NetworkDataType *const m_def;
134138 DefaultDataStreamer& m_streamer;
135- const NetworkDataType *const m_def;
136139 };
137140
138141 NET_FAST DefaultDataStreamer( const NetworkDataType *const def ) noexcept
@@ -149,7 +152,7 @@
149152
150153 NET_FAST ~DefaultDataStreamer()
151154 {
152- delete m_instance;
155+ delete (char*)m_instance;
153156 }
154157
155158 NET_FAST void Reset() noexcept
@@ -230,7 +233,9 @@
230233 case NETWORK_DWORD: this->Writer <int> ( n ); break;
231234 case NETWORK_FLOAT: this->Writer <float> ( n ); break;
232235 case NETWORK_DOUBLE: this->Writer <double> ( n ); break;
233- case NETWORK_VECTOR3D: this->Writer <CVector> ( n ); break;
236+ case NETWORK_VECTOR3D: this->Writer <CVector> ( n ); break;
237+ default:
238+ break;
234239 }
235240 }
236241
@@ -398,8 +403,10 @@
398403 template <class type>
399404 NET_FAST const type& Acknowledge( const unsigned int id, const type& previous, const type& next ) noexcept
400405 {
401- if ( previous != next )
402- m_instructs.push_back( new instruct <type> ( id, next ) );
406+ if ( previous != next )
407+ {
408+ m_instructs.push_back( new instruct <type> ( id, next ) );
409+ }
403410
404411 return next;
405412 }
@@ -455,7 +462,9 @@
455462 case NETWORK_DWORD: instance.NetworkWrite( id, (int)stream.template Read <int> () ); break;
456463 case NETWORK_FLOAT: instance.NetworkWrite( id, (float)stream.template Read <float> () ); break;
457464 case NETWORK_DOUBLE: instance.NetworkWrite( id, (double)stream.template Read <double> () ); break;
458- case NETWORK_VECTOR3D: instance.NetworkWrite( id, (CVector)stream.template Read <CVector> () ); break;
465+ case NETWORK_VECTOR3D: instance.NetworkWrite( id, (CVector)stream.template Read <CVector> () ); break;
466+ default:
467+ break;
459468 }
460469
461470 chgcnt--;
Show on old repository browser