mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-29 15:16:05 +00:00
Fixed: Compilation with clang
--HG-- branch : develop
This commit is contained in:
parent
e0cb4bbe9e
commit
9bb46d2ae8
7 changed files with 14 additions and 12 deletions
|
@ -749,7 +749,7 @@ namespace NLGUI
|
|||
std::string str;
|
||||
for (;;)
|
||||
{
|
||||
if (expr == '\0')
|
||||
if (*expr == '\0')
|
||||
{
|
||||
nlwarning("CInterfaceExprValue::evalString : end of buffer encountered in a string");
|
||||
return NULL;
|
||||
|
|
|
@ -1493,7 +1493,7 @@ static bool openDocWithExtension (const std::string &document, const std::string
|
|||
return true;
|
||||
}
|
||||
#elif defined(NL_OS_MAC)
|
||||
CFURLRef url = CFURLCreateWithBytes(NULL, (const UInt8 *)document, strlen(document), kCFStringEncodingUTF8, NULL);
|
||||
CFURLRef url = CFURLCreateWithBytes(NULL, (const UInt8 *)document.c_str(), document.length(), kCFStringEncodingUTF8, NULL);
|
||||
|
||||
if (url)
|
||||
{
|
||||
|
@ -1502,7 +1502,7 @@ static bool openDocWithExtension (const std::string &document, const std::string
|
|||
|
||||
if (res != 0)
|
||||
{
|
||||
nlwarning("LSOpenCFURLRef %s returned %d", document, (sint)res);
|
||||
nlwarning("LSOpenCFURLRef %s returned %d", document.c_str(), (sint)res);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1510,7 +1510,7 @@ static bool openDocWithExtension (const std::string &document, const std::string
|
|||
}
|
||||
else
|
||||
{
|
||||
nlwarning("Unable to create URL from %s", document);
|
||||
nlwarning("Unable to create URL from %s", document.c_str());
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -497,9 +497,9 @@ CSock::TSockResult CSock::receive( uint8 *buffer, uint32& len, bool throw_except
|
|||
if ( _NonBlocking )
|
||||
{
|
||||
// Receive incoming message (only the received part)
|
||||
|
||||
TTicks before = CTime::getPerformanceTime();
|
||||
len = ::recv( _Sock, (char*)buffer, len, 0 );
|
||||
|
||||
sint retLen = ::recv( _Sock, (char*)buffer, len, 0 );
|
||||
|
||||
//nlinfo ("CSock::receive(): NBM Received %d bytes to %d res: %d (%d)", realLen, _Sock, len, ERROR_NUM);
|
||||
|
||||
|
@ -509,7 +509,8 @@ CSock::TSockResult CSock::receive( uint8 *buffer, uint32& len, bool throw_except
|
|||
}
|
||||
|
||||
_MaxReceiveTime = max( (uint32)(CTime::ticksToSecond(CTime::getPerformanceTime()-before)*1000.0f), _MaxReceiveTime );
|
||||
switch ( len )
|
||||
|
||||
switch (retLen)
|
||||
{
|
||||
// Graceful disconnection
|
||||
case 0 :
|
||||
|
@ -546,12 +547,14 @@ CSock::TSockResult CSock::receive( uint8 *buffer, uint32& len, bool throw_except
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
len = (uint32)retLen;
|
||||
}
|
||||
else // Blocking Mode
|
||||
{
|
||||
// Receive incoming message, waiting until a complete message has arrived
|
||||
uint total = 0;
|
||||
uint brecvd;
|
||||
sint brecvd;
|
||||
|
||||
while ( total < len )
|
||||
{
|
||||
|
|
|
@ -34,6 +34,7 @@ class CPatchThread;
|
|||
class CCheckThread;
|
||||
class CScanDataThread;
|
||||
class CInstallThread;
|
||||
class CDownloadThread;
|
||||
|
||||
|
||||
// Useful for using an external downloader (BitTorrent) use of interface with CGameDownloader from client_background_rd.exe using as install program
|
||||
|
|
|
@ -1666,12 +1666,11 @@ namespace RSMGR
|
|||
sf_shard28 = 1<<28,
|
||||
sf_shard29 = 1<<29,
|
||||
sf_shard30 = 1<<30,
|
||||
sf_shard31 = 1<<31,
|
||||
|
||||
invalid_val,
|
||||
|
||||
/// Number of enumerated values
|
||||
nb_enum_items = 32
|
||||
nb_enum_items = 31
|
||||
};
|
||||
|
||||
|
||||
|
@ -1709,7 +1708,6 @@ namespace RSMGR
|
|||
NL_STRING_CONVERSION_TABLE_ENTRY(sf_shard28)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(sf_shard29)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(sf_shard30)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(sf_shard31)
|
||||
NL_STRING_CONVERSION_TABLE_ENTRY(invalid_val)
|
||||
};
|
||||
static NLMISC::CStringConversion<TValues>
|
||||
|
|
|
@ -76,7 +76,7 @@ inline ucstring capitalize(const ucstring & s)
|
|||
#define MACRO_CONCAT2(a,b) CONCAT(a,b)
|
||||
#define MACRO_TOTXT(a) #a
|
||||
#define MACRO_TOTXT2(a) TOTXT(a)
|
||||
#define __FILE_LINE__ __FILE__ ":"TOTXT2(__LINE__)":"
|
||||
#define __FILE_LINE__ __FILE__ ":" TOTXT2(__LINE__) ":"
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue