more fixes

This commit is contained in:
DarthArgus
2015-10-13 12:01:16 -05:00
parent 2a2b6dd4b7
commit e8c36ac70e
4 changed files with 2 additions and 6 deletions
@@ -46,8 +46,6 @@ ClockStamp Clock::getCurTime()
return ret;
#else
struct timeval tv;
int err;
err = gettimeofday(&tv, NULL);
return (static_cast<ClockStamp>(tv.tv_sec) * 1000 + static_cast<ClockStamp>(tv.tv_usec / 1000));
#endif
}
+1 -1
View File
@@ -148,7 +148,7 @@ inline int UpperHashString(char *string)
int h = 0;
while (*string != 0)
{
h = ((31 * h) + ((*string >= 'a' && *string <= 'z') ? (*string - 0x20) : *string) ^ (h >> 26));
h = ((31 * h) + (((*string >= 'a' && *string <= 'z') ? (*string - 0x20) : *string) ^ (h >> 26)));
string++;
}
return(h);
@@ -82,7 +82,7 @@ unsigned int FilterWithBufferedInput::BlockQueue::GetAll(byte *outString)
void FilterWithBufferedInput::BlockQueue::Put(const byte *inString, unsigned int length)
{
assert(m_size + length <= m_buffer.size);
byte *end = (m_size < m_buffer+m_buffer.size-m_begin) ? m_begin + m_size : m_begin + m_size - m_buffer.size;
byte *end = (m_size < (unsigned)(m_buffer+m_buffer.size-m_begin)) ? m_begin + m_size : m_begin + m_size - m_buffer.size;
unsigned int len = STDMIN(length, (unsigned int)(m_buffer+m_buffer.size-end));
memcpy(end, inString, len);
if (len < length)
@@ -19,7 +19,6 @@ namespace Archive
template <> void AutoDeltaPackedMap<int, Unicode::String>::pack(ByteStream & target, const std::string & buffer)
{
char temp[200];
char valueBuffer[200];
Command c;
Archive::put(target, countCharacter(buffer,':'));
@@ -31,7 +30,6 @@ namespace Archive
if (*i==':')
{
temp[tempPos]='\0';
valueBuffer[0]='\0';
sscanf(temp,"%i",&c.key);
char const * const valueStart = strchr(temp,' ');
if (valueStart)