1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-22 09:38:56 +08:00

Some fixes for compilation errors (#59)

* Update imovehelper.h

* Update string_t.h

* Update imovehelper.h
This commit is contained in:
Mohamed Amine "DS" Boussoubel 2021-11-04 22:09:49 +01:00 committed by GitHub
parent c500a84be5
commit 96df7cdd53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@
#pragma once
#endif
#include "shareddefs.h"
//-----------------------------------------------------------------------------
// Forward declarations

View File

@ -52,7 +52,7 @@ typedef int string_t;
struct string_t
{
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 ((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
{
castable_string_t() { pszValue = NULL; }
castable_string_t() { pszValue = nullptr; }
castable_string_t( const char *pszFrom ) { pszValue = (pszFrom && *pszFrom) ? pszFrom : 0; }
};