mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
uninitialized variables-core-2
(cherry picked from commit 7c329699e4e4d13a164b2483e174b5f555ea9344)
This commit is contained in:
parent
b6c33bdd2b
commit
bfcc83638d
8 changed files with 12 additions and 6 deletions
|
|
@ -529,6 +529,7 @@ inline void ColorI::set(const Hsb& color)
|
||||||
red = (U32)((((F64)r) / 100) * 255);
|
red = (U32)((((F64)r) / 100) * 255);
|
||||||
green = (U32)((((F64)g) / 100) * 255);
|
green = (U32)((((F64)g) / 100) * 255);
|
||||||
blue = (U32)((((F64)b) / 100) * 255);
|
blue = (U32)((((F64)b) / 100) * 255);
|
||||||
|
alpha = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a subfunction of HSLtoRGB
|
// This is a subfunction of HSLtoRGB
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,9 @@ class OggTheoraFrame : public RawData
|
||||||
|
|
||||||
typedef RawData Parent;
|
typedef RawData Parent;
|
||||||
|
|
||||||
OggTheoraFrame() {}
|
OggTheoraFrame() :mFrameNumber(0), mFrameTime(0), mFrameDuration(0) {}
|
||||||
OggTheoraFrame( S8* data, U32 size, bool ownMemory = false )
|
OggTheoraFrame( S8* data, U32 size, bool ownMemory = false )
|
||||||
: Parent( data, size, ownMemory ) {}
|
: Parent( data, size, ownMemory ), mFrameNumber(0), mFrameTime(0), mFrameDuration(0) {}
|
||||||
|
|
||||||
/// Serial number of this frame in the stream.
|
/// Serial number of this frame in the stream.
|
||||||
U32 mFrameNumber;
|
U32 mFrameNumber;
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
FileStream::FileStream()
|
FileStream::FileStream()
|
||||||
{
|
{
|
||||||
|
dMemset(mBuffer, 0, sizeof(mBuffer));
|
||||||
// initialize the file stream
|
// initialize the file stream
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@
|
||||||
|
|
||||||
StringBufferManager()
|
StringBufferManager()
|
||||||
{
|
{
|
||||||
|
request8 = 0.0;
|
||||||
|
request16 = 0.0;
|
||||||
VECTOR_SET_ASSOCIATION( strings );
|
VECTOR_SET_ASSOCIATION( strings );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -335,6 +335,7 @@ class Journal
|
||||||
struct FuncDecl {
|
struct FuncDecl {
|
||||||
FuncDecl* next;
|
FuncDecl* next;
|
||||||
Id id;
|
Id id;
|
||||||
|
FuncDecl() :next(NULL), id(0){}
|
||||||
virtual ~FuncDecl() {}
|
virtual ~FuncDecl() {}
|
||||||
virtual bool match(VoidPtr,VoidMethod) const = 0;
|
virtual bool match(VoidPtr,VoidMethod) const = 0;
|
||||||
virtual Functor* create() const = 0;
|
virtual Functor* create() const = 0;
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
#include "platform/types.h"
|
#include "platform/types.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
template< class T > class Vector;
|
template< class T > class Vector;
|
||||||
|
|
||||||
|
|
@ -244,7 +245,7 @@ public:
|
||||||
_dynamicSize( 0 ),
|
_dynamicSize( 0 ),
|
||||||
_len( 0 )
|
_len( 0 )
|
||||||
{
|
{
|
||||||
_fixedBuffer[0] = '\0';
|
strncpy(_fixedBuffer, "", 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
StrFormat(const char *formatStr, va_list args)
|
StrFormat(const char *formatStr, va_list args)
|
||||||
|
|
@ -269,7 +270,7 @@ public:
|
||||||
void reset()
|
void reset()
|
||||||
{
|
{
|
||||||
_len = 0;
|
_len = 0;
|
||||||
_fixedBuffer[0] = '\0';
|
strncpy(_fixedBuffer, "", 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Copy the formatted string into the output buffer which must be at least size() characters.
|
/// Copy the formatted string into the output buffer which must be at least size() characters.
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ private:
|
||||||
{
|
{
|
||||||
Link* next;
|
Link* next;
|
||||||
Link* prev;
|
Link* prev;
|
||||||
Link() {}
|
Link(): next(NULL), prev(NULL) {}
|
||||||
Link(Link* p,Link* n): next(n),prev(p) {}
|
Link(Link* p,Link* n): next(n),prev(p) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ protected:
|
||||||
|
|
||||||
void insert(DelegateLink* node, F32 order);
|
void insert(DelegateLink* node, F32 order);
|
||||||
void unlink();
|
void unlink();
|
||||||
|
DelegateLink() :next(NULL), prev(NULL), mOrder(0) {}
|
||||||
virtual ~DelegateLink() {}
|
virtual ~DelegateLink() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue