Skip to content

Commit

Permalink
Remove ambiguous symbols (part 7)
Browse files Browse the repository at this point in the history
Relace TCHAR, generic_string & TEXT("") par wchar_t, wstring & L"" respectively.
Follow up: 94af271

Close notepad-plus-plus#15381
  • Loading branch information
donho committed Jul 1, 2024
1 parent f7d9e7c commit 88bd09e
Show file tree
Hide file tree
Showing 8 changed files with 418 additions and 418 deletions.
188 changes: 94 additions & 94 deletions PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ bool TiXmlDocumentA::LoadUnicodeFilePath( const TCHAR* filename )

if ( file )
{
// Get the file size, so we can pre-allocate the generic_string. HUGE speed impact.
// Get the file size, so we can pre-allocate the string. HUGE speed impact.
long length = 0;
fseek( file, 0, SEEK_END );
length = ftell( file );
Expand Down
6 changes: 3 additions & 3 deletions PowerEditor/src/TinyXml/tinystr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ distribution.

#include "tinystr.h"

// TiXmlString constructor, based on a C generic_string
// TiXmlString constructor, based on a C string
TiXmlString::TiXmlString (const TCHAR* instring)
{
unsigned newlen;
Expand Down Expand Up @@ -168,7 +168,7 @@ void TiXmlString::append( const TCHAR* str, int len )
}
else
{
// we know we can safely append the new generic_string
// we know we can safely append the new string
// strncat (cstring, str, len);
memcpy (cstring + length (),
str,
Expand Down Expand Up @@ -215,7 +215,7 @@ void TiXmlString::append( const TCHAR * suffix )
}
else
{
// we know we can safely append the new generic_string
// we know we can safely append the new string
memcpy (cstring + length (),
suffix,
lstrlen (suffix) + 1);
Expand Down
12 changes: 6 additions & 6 deletions PowerEditor/src/TinyXml/tinystr.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ distribution.
Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.
Only the member functions relevant to the TinyXML project have been implemented.
The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase
a generic_string and there's no more room, we allocate a buffer twice as big as we need.
a string and there's no more room, we allocate a buffer twice as big as we need.
*/
class TiXmlString
{
public :
// TiXmlString constructor, based on a generic_string
// TiXmlString constructor, based on a string
TiXmlString (const TCHAR * instring);

// TiXmlString empty constructor
Expand Down Expand Up @@ -126,13 +126,13 @@ class TiXmlString
return cstring [index];
}

// find a TCHAR in a generic_string. Return TiXmlString::notfound if not found
// find a char in a string. Return TiXmlString::notfound if not found
unsigned find (TCHAR lookup) const
{
return find (lookup, 0);
}

// find a TCHAR in a generic_string from an offset. Return TiXmlString::notfound if not found
// find a char in a string from an offset. Return TiXmlString::notfound if not found
unsigned find (TCHAR tofind, unsigned offset) const;

/* Function to reserve a big amount of data when we know we'll need it. Be aware that this
Expand Down Expand Up @@ -165,11 +165,11 @@ class TiXmlString

protected :

// The base generic_string
// The base string
TCHAR * cstring;
// Number of chars allocated
unsigned allocated;
// Current generic_string size
// Current string size
unsigned current_length;

// New size computation. It is simplistic right now : it returns twice the amount
Expand Down
Loading

0 comments on commit 88bd09e

Please sign in to comment.