MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / readVector

Function readVector

Engine/source/afx/afxMagicMissile.cpp:559–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557// Read a vector of items
558template <class T>
559bool readVector(Vector<T> & vec, Stream & stream, const char * msg)
560{
561 U32 num, i;
562 bool Ok = true;
563 stream.read( & num );
564 vec.setSize( num );
565 for( i = 0; i < num && Ok; i++ ){
566 Ok = stream.read(& vec[i]);
567 AssertISV( Ok, avar("math vec read error (%s) on elem %d", msg, i) );
568 }
569 return Ok;
570}
571// Write a vector of items
572template <class T>
573bool writeVector(const Vector<T> & vec, Stream & stream, const char * msg)

Callers 1

unpackDataMethod · 0.85

Calls 3

avarFunction · 0.85
readMethod · 0.45
setSizeMethod · 0.45

Tested by

no test coverage detected