Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xerces-c
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cinema-developers
xerces-c
Commits
25389e35
Commit
25389e35
authored
4 years ago
by
Roger Leigh
Browse files
Options
Downloads
Patches
Plain Diff
XERCESC-2208: Add special cases for C++11 character types
parent
2401d2b4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xercesc/util/BitOps.hpp
+16
-0
16 additions, 0 deletions
src/xercesc/util/BitOps.hpp
src/xercesc/util/XMLUTF16Transcoder.cpp
+1
-1
1 addition, 1 deletion
src/xercesc/util/XMLUTF16Transcoder.cpp
with
17 additions
and
1 deletion
src/xercesc/util/BitOps.hpp
+
16
−
0
View file @
25389e35
...
@@ -38,6 +38,12 @@ public:
...
@@ -38,6 +38,12 @@ public:
return
XMLCh
(((
toSwap
>>
8
)
|
(
toSwap
<<
8
))
&
0xFFFF
);
return
XMLCh
(((
toSwap
>>
8
)
|
(
toSwap
<<
8
))
&
0xFFFF
);
}
}
static
inline
UTF16Ch
swapBytes
(
const
UTF16Ch
toSwap
)
{
//The mask is required to overcome a compiler error on solaris
return
XMLCh
(((
toSwap
>>
8
)
|
(
toSwap
<<
8
))
&
0xFFFF
);
}
static
inline
unsigned
int
swapBytes
(
const
XMLUInt32
toSwap
)
static
inline
unsigned
int
swapBytes
(
const
XMLUInt32
toSwap
)
{
{
return
return
...
@@ -49,6 +55,16 @@ public:
...
@@ -49,6 +55,16 @@ public:
);
);
}
}
static
inline
UCS4Ch
swapBytes
(
const
UCS4Ch
toSwap
)
{
return
(
(
toSwap
>>
24
)
|
(
toSwap
<<
24
)
|
((
toSwap
&
0xFF00
)
<<
8
)
|
((
toSwap
&
0xFF0000
)
>>
8
)
);
}
protected
:
protected
:
...
...
This diff is collapsed.
Click to expand it.
src/xercesc/util/XMLUTF16Transcoder.cpp
+
1
−
1
View file @
25389e35
...
@@ -156,7 +156,7 @@ XMLUTF16Transcoder::transcodeTo(const XMLCh* const srcData
...
@@ -156,7 +156,7 @@ XMLUTF16Transcoder::transcodeTo(const XMLCh* const srcData
for
(
XMLSize_t
index
=
0
;
index
<
countToDo
;
index
++
)
for
(
XMLSize_t
index
=
0
;
index
<
countToDo
;
index
++
)
{
{
// To avoid flakey compilers, use a temp
// To avoid flakey compilers, use a temp
const
UTF16Ch
tmpCh
=
UTF16Ch
(
*
srcPtr
++
);
const
UTF16Ch
tmpCh
=
static_cast
<
UTF16Ch
>
(
*
srcPtr
++
);
*
outPtr
++
=
BitOps
::
swapBytes
(
tmpCh
);
*
outPtr
++
=
BitOps
::
swapBytes
(
tmpCh
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment