mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-23 01:59:43 +08:00
Some fixes for compilation errors (#59)
* Update imovehelper.h * Update string_t.h * Update imovehelper.h
This commit is contained in:
parent
c500a84be5
commit
96df7cdd53
@ -12,6 +12,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "shareddefs.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Forward declarations
|
// Forward declarations
|
||||||
|
@ -52,7 +52,7 @@ typedef int string_t;
|
|||||||
struct string_t
|
struct string_t
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool operator!() const { return ( pszValue == NULL ); }
|
bool operator!() const { return ( pszValue == nullptr ); }
|
||||||
bool operator==( const string_t &rhs ) const { return ( pszValue == rhs.pszValue ); }
|
bool operator==( const string_t &rhs ) const { return ( pszValue == rhs.pszValue ); }
|
||||||
bool operator!=( const string_t &rhs ) const { return ( pszValue != rhs.pszValue ); }
|
bool operator!=( const string_t &rhs ) const { return ( pszValue != rhs.pszValue ); }
|
||||||
bool operator<( const string_t &rhs ) const { return ((void *)pszValue < (void *)rhs.pszValue ); }
|
bool operator<( const string_t &rhs ) const { return ((void *)pszValue < (void *)rhs.pszValue ); }
|
||||||
@ -67,7 +67,7 @@ protected:
|
|||||||
|
|
||||||
struct castable_string_t : public string_t // string_t is used in unions, hence, no constructor allowed
|
struct castable_string_t : public string_t // string_t is used in unions, hence, no constructor allowed
|
||||||
{
|
{
|
||||||
castable_string_t() { pszValue = NULL; }
|
castable_string_t() { pszValue = nullptr; }
|
||||||
castable_string_t( const char *pszFrom ) { pszValue = (pszFrom && *pszFrom) ? pszFrom : 0; }
|
castable_string_t( const char *pszFrom ) { pszValue = (pszFrom && *pszFrom) ? pszFrom : 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user