FIDANzza

Untitled

Jan 19th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. struct FString : public TArray< wchar_t >
  2. {
  3. FString() {};
  4.  
  5. FString(wchar_t* Other)
  6. {
  7. this->Max = this->Count = *Other ? (wcslen(Other) + 1) : 0;
  8.  
  9. if (this->Count)
  10. this->Data = Other;
  11. };
  12.  
  13. ~FString() {};
  14.  
  15. FString operator = (wchar_t* Other)
  16. {
  17. if (this->Data != Other)
  18. {
  19. this->Max = this->Count = *Other ? (wcslen(Other) + 1) : 0;
  20.  
  21. if (this->Count)
  22. this->Data = Other;
  23. }
  24.  
  25. return *this;
  26. };
  27. };
Advertisement
Add Comment
Please, Sign In to add comment