Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
ca790f73
Commit
ca790f73
authored
12 years ago
by
Kitty Barnett
Browse files
Options
Downloads
Patches
Plain Diff
Bypass GCC template stumble by specializing getMaterialField for LLUUID
parent
5824e60c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llprimitive/llmaterial.cpp
+11
-0
11 additions, 0 deletions
indra/llprimitive/llmaterial.cpp
with
11 additions
and
0 deletions
indra/llprimitive/llmaterial.cpp
+
11
−
0
View file @
ca790f73
...
@@ -76,6 +76,17 @@ template<typename T> T getMaterialField(const LLSD& data, const std::string& fie
...
@@ -76,6 +76,17 @@ template<typename T> T getMaterialField(const LLSD& data, const std::string& fie
return
(
T
)
LLSD
();
return
(
T
)
LLSD
();
}
}
// GCC didn't like the generic form above for some reason
template
<
>
LLUUID
getMaterialField
(
const
LLSD
&
data
,
const
std
::
string
&
field
,
const
LLSD
::
Type
field_type
)
{
if
(
(
data
.
has
(
field
))
&&
(
field_type
==
data
[
field
].
type
())
)
{
return
data
[
field
].
asUUID
();
}
llerrs
<<
"Missing or mistyped field '"
<<
field
<<
"' in material definition"
<<
llendl
;
return
LLUUID
::
null
;
}
/**
/**
* LLMaterial class
* LLMaterial class
*/
*/
...
...
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