Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
graphicsframework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Oliver Behnke
graphicsframework
Commits
d6b8f9f3
Commit
d6b8f9f3
authored
16 years ago
by
Oliver Bock
Browse files
Options
Downloads
Patches
Plain Diff
Ensure 64 bit compatibility
parent
b9739aa3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/orc/ResourceCompiler.cpp
+5
-5
5 additions, 5 deletions
src/orc/ResourceCompiler.cpp
with
5 additions
and
5 deletions
src/orc/ResourceCompiler.cpp
+
5
−
5
View file @
d6b8f9f3
...
@@ -45,7 +45,7 @@ void ResourceCompiler::compile()
...
@@ -45,7 +45,7 @@ void ResourceCompiler::compile()
map
<
string
,
vector
<
unsigned
char
>
>::
iterator
mapPos
;
map
<
string
,
vector
<
unsigned
char
>
>::
iterator
mapPos
;
vector
<
unsigned
char
>::
iterator
dataPos
;
vector
<
unsigned
char
>::
iterator
dataPos
;
unsigned
in
t
currentIndex
=
0
;
size_
t
currentIndex
=
0
;
// store total amount of resources
// store total amount of resources
resourceIndexInitializer
<<
"{0x"
<<
hex
<<
m_ResourceDataMap
.
size
()
<<
", 0x0},"
;
resourceIndexInitializer
<<
"{0x"
<<
hex
<<
m_ResourceDataMap
.
size
()
<<
", 0x0},"
;
...
@@ -64,7 +64,7 @@ void ResourceCompiler::compile()
...
@@ -64,7 +64,7 @@ void ResourceCompiler::compile()
// iterate over the data content byte by byte
// iterate over the data content byte by byte
for
(
dataPos
=
mapPos
->
second
.
begin
();
dataPos
!=
mapPos
->
second
.
end
();
++
dataPos
)
{
for
(
dataPos
=
mapPos
->
second
.
begin
();
dataPos
!=
mapPos
->
second
.
end
();
++
dataPos
)
{
// store byte value as part of array initializer
// store byte value as part of array initializer
resourceStorageInitializer
<<
"0x"
<<
hex
<<
(
in
t
)
*
dataPos
<<
","
;
resourceStorageInitializer
<<
"0x"
<<
hex
<<
(
size_
t
)
*
dataPos
<<
","
;
}
}
}
}
...
@@ -89,7 +89,7 @@ void ResourceCompiler::compile()
...
@@ -89,7 +89,7 @@ void ResourceCompiler::compile()
outputFile
<<
endl
<<
"};"
<<
endl
<<
endl
;
outputFile
<<
endl
<<
"};"
<<
endl
<<
endl
;
output
=
resourceIndexInitializer
.
str
();
output
=
resourceIndexInitializer
.
str
();
outputFile
<<
"extern const unsigned
in
t c_ResourceIndex[][2] = {"
<<
endl
;
outputFile
<<
"extern const unsigned
size_
t c_ResourceIndex[][2] = {"
<<
endl
;
outputFile
<<
output
.
substr
(
0
,
output
.
length
()
-
1
);
outputFile
<<
output
.
substr
(
0
,
output
.
length
()
-
1
);
outputFile
<<
endl
<<
"};"
<<
endl
<<
endl
;
outputFile
<<
endl
<<
"};"
<<
endl
<<
endl
;
...
@@ -124,13 +124,13 @@ void ResourceCompiler::parseInputFile()
...
@@ -124,13 +124,13 @@ void ResourceCompiler::parseInputFile()
// read input file line by line
// read input file line by line
while
(
getline
(
inputFile
,
line
))
{
while
(
getline
(
inputFile
,
line
))
{
unsigned
in
t
firstCharacter
=
line
.
find_first_not_of
(
"
\t\r\n\f
"
);
size_
t
firstCharacter
=
line
.
find_first_not_of
(
"
\t\r\n\f
"
);
// we (sort of) allow for empty lines and comments
// we (sort of) allow for empty lines and comments
if
(
firstCharacter
!=
string
::
npos
&&
line
.
substr
(
firstCharacter
,
1
)
!=
"#"
)
{
if
(
firstCharacter
!=
string
::
npos
&&
line
.
substr
(
firstCharacter
,
1
)
!=
"#"
)
{
// find our token delimiter
// find our token delimiter
unsigned
in
t
separator
=
line
.
find
(
"|"
);
size_
t
separator
=
line
.
find
(
"|"
);
// make sure there's exactly one delimiter
// make sure there's exactly one delimiter
if
(
separator
==
string
::
npos
||
separator
!=
line
.
rfind
(
"|"
))
{
if
(
separator
==
string
::
npos
||
separator
!=
line
.
rfind
(
"|"
))
{
...
...
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