Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB

  1. //====== Copyright � Valve Corporation, All rights reserved. ==================
  2. //
  3. // Purpose: String class thats more suited to frequent modification/appends
  4. // than CUtlString. Copied from Steam's tier1 utlstring.h instead of
  5. // a full utlstring.h merge because the files differed nearly 100%.
  6. //
  7. //=============================================================================
  8. #ifndef UTLSTRINGBUILDER_H
  9. #define UTLSTRINGBUILDER_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "tier1/utlmemory.h"
  14. #include "tier1/strtools.h"
  15. #include "tier1/utlstring.h"
  16. #if 0
  17. #include "limits.h"
  18. #include "tier1/utlbinaryblock.h"
  19. #endif
  20. //-----------------------------------------------------------------------------
  21. // Data and memory validation
  22. //-----------------------------------------------------------------------------
  23. #ifdef DBGFLAG_VALIDATE
  24. inline void CUtlStringBuilder::Validate( CValidator &validator, const char *pchName )
  25. {
  26. #ifdef _WIN32
  27. validator.Push( typeid(*this).raw_name(), this, pchName );
  28. #else
  29. validator.Push( typeid(*this).name(), this, pchName );
  30. #endif
  31. if ( m_data.IsHeap() )
  32. validator.ClaimMemory( Access() );
  33. validator.Pop();
  34. }
  35. #endif // DBGFLAG_VALIDATE
  36. #endif // UTLSTRINGBUILDER_H