Merge from origin

This commit is contained in:
Pavel Krajcevski 2014-03-25 18:28:05 -04:00
commit 1bfda210c0
7 changed files with 7 additions and 8 deletions

View File

@ -97,8 +97,6 @@ static T max(const T &a, const T &b) {
}
#endif
static const double kPi = 3.141592653589793238462643383279502884197;
///////////////////////////////////////////////////////////////////////////////
//
// Static helper functions

View File

@ -64,7 +64,7 @@ TEST(VectorBase, Constructors) {
for(int i = 0; i < 7; i++)
v7i[i] = -i;
FasTC::VectorBase<unsigned, 16> v16u;
for(int i = 0; i < 7; i++)
for(int i = 0; i < 16; i++)
v16u[i] = i;
#define TEST_VECTOR_COPY_CONS(v, t, n) \

View File

@ -125,8 +125,6 @@ class ThreadGroup {
EThreadState m_ThreadState;
bool m_ExitFlag;
std::ostream *m_LogStream;
};
#endif // _THREAD_GROUP_H_

View File

@ -140,6 +140,8 @@ void TCThread::Yield() {
uint64 TCThread::ThreadID() {
#ifdef __MINGW32__
return static_cast<uint64>(pthread_self().x);
#elif defined __APPLE__
return reinterpret_cast<uint64>(pthread_self());
#else
return static_cast<uint64>(pthread_self());
#endif

View File

@ -86,7 +86,6 @@ public:
static const unsigned int kMaxFilenameSz = 256;
char m_Filename[kMaxFilenameSz];
unsigned int m_Handle;
unsigned int m_Width;
unsigned int m_Height;

View File

@ -241,7 +241,8 @@ EImageFileFormat ImageFile::DetectFileFormat(const CHAR *filename) {
size_t len = strlen(filename);
if(len >= 256) {
// !FIXME! Report Error...
assert(false);
ReportError("Filename too long!");
return kNumImageFileFormats;
}
@ -249,6 +250,7 @@ EImageFileFormat ImageFile::DetectFileFormat(const CHAR *filename) {
while((dotPos >= len)? false : filename[dotPos--] != '.');
if (dotPos >= len) {
assert(!"Malformed filename... no .ext");
return kNumImageFileFormats;
}

View File

@ -216,7 +216,7 @@ bool ImageLoaderKTX::ReadData() {
memcpy(keyValueData, rdr.GetData(), keyAndValueByteSize);
const char *key = reinterpret_cast<const char *>((const uint8 *)keyValueData);
const char *value = key;
while(value != '\0') {
while(*value != '\0') {
value++;
}
value++; // consume the null byte