mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-30 20:24:24 +01:00
Merge from origin
This commit is contained in:
commit
1bfda210c0
@ -97,8 +97,6 @@ static T max(const T &a, const T &b) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static const double kPi = 3.141592653589793238462643383279502884197;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Static helper functions
|
||||
|
@ -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) \
|
||||
|
@ -125,8 +125,6 @@ class ThreadGroup {
|
||||
|
||||
EThreadState m_ThreadState;
|
||||
bool m_ExitFlag;
|
||||
|
||||
std::ostream *m_LogStream;
|
||||
};
|
||||
|
||||
#endif // _THREAD_GROUP_H_
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user