Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xdmf
Xdmf
Commits
e08cae07
Commit
e08cae07
authored
Nov 26, 2013
by
Kenneth Leiter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COMP: Fix visitor to not return void - necessary for MSVC compiler.
parent
b233dc78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
core/loki/Visitor.h
core/loki/Visitor.h
+7
-7
No files found.
core/loki/Visitor.h
View file @
e08cae07
...
...
@@ -267,9 +267,9 @@ struct DefaultCatchAll
// Apply the Acyclic Visitor
if
(
Visitor
<
T
,
R
>*
p
=
dynamic_cast
<
Visitor
<
T
,
R
>*>
(
guest
.
get
()))
{
return
p
->
visit
(
visited
,
guest
);
p
->
visit
(
visited
,
guest
);
}
return
R
()
;
return
;
}
};
...
...
@@ -288,9 +288,9 @@ struct DefaultCatchAll
// Apply the Acyclic Visitor
if
(
Visitor
<
T
,
R
,
true
>*
p
=
dynamic_cast
<
Visitor
<
T
,
R
,
true
>*>
(
guest
.
get
()))
{
return
p
->
visit
(
visited
,
guest
);
p
->
visit
(
visited
,
guest
);
}
return
R
()
;
return
;
}
};
...
...
@@ -303,18 +303,18 @@ struct DefaultCatchAll
#define LOKI_DEFINE_VISITABLE_BASE() \
virtual ReturnType accept(const shared_ptr<Loki::BaseVisitor> guest) \
{
return
acceptImpl(*this, guest); }
{ acceptImpl(*this, guest); }
#define LOKI_DEFINE_VISITABLE(my_class, my_base) \
virtual ReturnType accept(const shared_ptr<Loki::BaseVisitor> guest) \
{ \
if (Loki::Visitor<my_class,ReturnType>* p = dynamic_cast<Loki::Visitor<my_class,ReturnType>*>(guest.get())) \
{ \
return
p->visit(*this, guest); \
p->visit(*this, guest); \
} \
else \
{ \
return
my_base::accept(guest); \
my_base::accept(guest); \
} \
}
...
...
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