Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro
Commits
b8526718
Commit
b8526718
authored
Sep 23, 2023
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format
parent
8220d5fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
gframe/irrUString.h
gframe/irrUString.h
+17
-17
No files found.
gframe/irrUString.h
View file @
b8526718
...
@@ -111,9 +111,9 @@ inline uchar16_t swapEndian16(const uchar16_t& c) {
...
@@ -111,9 +111,9 @@ inline uchar16_t swapEndian16(const uchar16_t& c) {
//! \return The new value.
//! \return The new value.
inline
uchar32_t
swapEndian32
(
const
uchar32_t
&
c
)
{
inline
uchar32_t
swapEndian32
(
const
uchar32_t
&
c
)
{
return
((
c
>>
24
)
&
0x000000FF
)
|
return
((
c
>>
24
)
&
0x000000FF
)
|
((
c
>>
8
)
&
0x0000FF00
)
|
((
c
>>
8
)
&
0x0000FF00
)
|
((
c
<<
8
)
&
0x00FF0000
)
|
((
c
<<
8
)
&
0x00FF0000
)
|
((
c
<<
24
)
&
0xFF000000
);
((
c
<<
24
)
&
0xFF000000
);
}
}
//! The Unicode byte order mark.
//! The Unicode byte order mark.
...
@@ -138,21 +138,21 @@ const u8 BOM_ENCODE_UTF32_LEN = 4;
...
@@ -138,21 +138,21 @@ const u8 BOM_ENCODE_UTF32_LEN = 4;
//! Unicode encoding type.
//! Unicode encoding type.
enum
EUTF_ENCODE
{
enum
EUTF_ENCODE
{
EUTFE_NONE
=
0
,
EUTFE_NONE
=
0
,
EUTFE_UTF8
,
EUTFE_UTF8
,
EUTFE_UTF16
,
EUTFE_UTF16
,
EUTFE_UTF16_LE
,
EUTFE_UTF16_LE
,
EUTFE_UTF16_BE
,
EUTFE_UTF16_BE
,
EUTFE_UTF32
,
EUTFE_UTF32
,
EUTFE_UTF32_LE
,
EUTFE_UTF32_LE
,
EUTFE_UTF32_BE
EUTFE_UTF32_BE
};
};
//! Unicode endianness.
//! Unicode endianness.
enum
EUTF_ENDIAN
{
enum
EUTF_ENDIAN
{
EUTFEE_NATIVE
=
0
,
EUTFEE_NATIVE
=
0
,
EUTFEE_LITTLE
,
EUTFEE_LITTLE
,
EUTFEE_BIG
EUTFEE_BIG
};
};
//! Returns the specified unicode byte order mark in a byte array.
//! Returns the specified unicode byte order mark in a byte array.
...
@@ -2234,7 +2234,7 @@ public:
...
@@ -2234,7 +2234,7 @@ public:
for
(
u32
j
=
0
;
j
<
count
;
++
j
)
{
for
(
u32
j
=
0
;
j
<
count
;
++
j
)
{
if
(
ch
==
c
[
j
])
{
if
(
ch
==
c
[
j
])
{
if
((
!
ignoreEmptyTokens
||
pos
-
lastpos
!=
0
)
&&
if
((
!
ignoreEmptyTokens
||
pos
-
lastpos
!=
0
)
&&
!
lastWasSeparator
)
!
lastWasSeparator
)
ret
.
push_back
(
ustring16
<
TAlloc
>
(
&
array
[
lastpospos
],
pos
-
lastpos
));
ret
.
push_back
(
ustring16
<
TAlloc
>
(
&
array
[
lastpospos
],
pos
-
lastpos
));
foundSeparator
=
true
;
foundSeparator
=
true
;
lastpos
=
(
keepSeparators
?
pos
:
pos
+
1
);
lastpos
=
(
keepSeparators
?
pos
:
pos
+
1
);
...
@@ -2836,7 +2836,7 @@ public:
...
@@ -2836,7 +2836,7 @@ public:
//! \return An enum describing the endianness of this string.
//! \return An enum describing the endianness of this string.
const
unicode
::
EUTF_ENDIAN
getEndianness
()
const
{
const
unicode
::
EUTF_ENDIAN
getEndianness
()
const
{
if
(
encoding
==
unicode
::
EUTFE_UTF16_LE
||
if
(
encoding
==
unicode
::
EUTFE_UTF16_LE
||
encoding
==
unicode
::
EUTFE_UTF32_LE
)
encoding
==
unicode
::
EUTFE_UTF32_LE
)
return
unicode
::
EUTFEE_LITTLE
;
return
unicode
::
EUTFEE_LITTLE
;
else
return
unicode
::
EUTFEE_BIG
;
else
return
unicode
::
EUTFEE_BIG
;
}
}
...
@@ -2964,7 +2964,7 @@ template <typename TAlloc>
...
@@ -2964,7 +2964,7 @@ template <typename TAlloc>
inline
ustring16
<
TAlloc
>
&&
operator
+
(
ustring16
<
TAlloc
>
&&
left
,
ustring16
<
TAlloc
>
&&
right
)
{
inline
ustring16
<
TAlloc
>
&&
operator
+
(
ustring16
<
TAlloc
>
&&
left
,
ustring16
<
TAlloc
>
&&
right
)
{
//std::cout << "MOVE operator+(&&, &&)" << std::endl;
//std::cout << "MOVE operator+(&&, &&)" << std::endl;
if
((
right
.
size_raw
()
<=
left
.
capacity
()
-
left
.
size_raw
())
||
if
((
right
.
size_raw
()
<=
left
.
capacity
()
-
left
.
size_raw
())
||
(
right
.
capacity
()
-
right
.
size_raw
()
<
left
.
size_raw
()))
{
(
right
.
capacity
()
-
right
.
size_raw
()
<
left
.
size_raw
()))
{
left
.
append
(
right
);
left
.
append
(
right
);
return
std
::
move
(
left
);
return
std
::
move
(
left
);
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment