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
Ben Boeckel
Xdmf
Commits
0dee6275
Commit
0dee6275
authored
Apr 24, 2012
by
Kenneth Leiter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COMP: Fix a few intel compiler warnings.
parent
3eb2d342
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
51 deletions
+53
-51
core/loki/Visitor.h
core/loki/Visitor.h
+44
-42
utils/XdmfFortran.cpp
utils/XdmfFortran.cpp
+9
-9
No files found.
core/loki/Visitor.h
View file @
0dee6275
...
...
@@ -136,6 +136,7 @@ namespace Loki
virtual
ReturnType
visit
(
ParamType
&
,
shared_ptr
<
BaseVisitor
>
)
=
0
;
};
/*
template <class T, typename R>
class Visitor<T, R, true>
{
...
...
@@ -145,6 +146,7 @@ namespace Loki
virtual ~Visitor() {}
virtual ReturnType visit(ParamType&, shared_ptr<BaseVisitor>) = 0;
};
*/
////////////////////////////////////////////////////////////////////////////////
// class template Visitor (specialization)
...
...
@@ -161,41 +163,41 @@ namespace Loki
// };
////////////////////////////////////////////////////////////////////////////////
template
<
class
Head
,
class
Tail
,
typename
R
>
class
Visitor
<
Typelist
<
Head
,
Tail
>
,
R
,
false
>
:
public
Visitor
<
Head
,
R
,
false
>
,
public
Visitor
<
Tail
,
R
,
false
>
{
public:
typedef
R
ReturnType
;
// using Visitor<Head, R>::Visit;
// using Visitor<Tail, R>::Visit;
};
/*
template <class Head, class Tail, typename R>
*/
/*
class Visitor<Typelist<Head, Tail>, R, false>
*/
/*
: public Visitor<Head, R, false>, public Visitor<Tail, R, false>
*/
/*
{
*/
/*
public:
*/
/*
typedef R ReturnType;
*/
/*
// using Visitor<Head, R>::Visit;
*/
/*
// using Visitor<Tail, R>::Visit;
*/
/*
};
*/
template
<
class
Head
,
typename
R
>
class
Visitor
<
Typelist
<
Head
,
NullType
>
,
R
,
false
>
:
public
Visitor
<
Head
,
R
,
false
>
{
public:
typedef
R
ReturnType
;
using
Visitor
<
Head
,
R
,
false
>::
Visit
;
};
template
<
class
Head
,
class
Tail
,
typename
R
>
class
Visitor
<
Typelist
<
Head
,
Tail
>
,
R
,
true
>
:
public
Visitor
<
Head
,
R
,
true
>
,
public
Visitor
<
Tail
,
R
,
true
>
{
public:
typedef
R
ReturnType
;
// using Visitor<Head, R>::Visit;
// using Visitor<Tail, R>::Visit;
};
/*
template <class Head, typename R>
*/
/*
class Visitor<Typelist<Head, NullType>, R, false> : public Visitor<Head, R, false>
*/
/*
{
*/
/*
public:
*/
/*
typedef R ReturnType;
*/
/*
using Visitor<Head, R, false>::Visit;
*/
/*
};
*/
/*
template <class Head, class Tail, typename R>
*/
/*
class Visitor<Typelist<Head, Tail>, R, true>
*/
/*
: public Visitor<Head, R, true>, public Visitor<Tail, R, true>
*/
/*
{
*/
/*
public:
*/
/*
typedef R ReturnType;
*/
/*
// using Visitor<Head, R>::Visit;
*/
/*
// using Visitor<Tail, R>::Visit;
*/
/*
};
*/
template
<
class
Head
,
typename
R
>
class
Visitor
<
Typelist
<
Head
,
NullType
>
,
R
,
true
>
:
public
Visitor
<
Head
,
R
,
true
>
{
public:
typedef
R
ReturnType
;
using
Visitor
<
Head
,
R
,
true
>::
visit
;
};
/*
template <class Head, typename R>
*/
/*
class Visitor<Typelist<Head, NullType>, R, true> : public Visitor<Head, R, true>
*/
/*
{
*/
/*
public:
*/
/*
typedef R ReturnType;
*/
/*
using Visitor<Head, R, true>::visit;
*/
/*
};
*/
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -203,7 +205,7 @@ namespace Loki
// Implements non-strict visitation (you can implement only part of the Visit
// functions)
////////////////////////////////////////////////////////////////////////////////
/*
template <class TList, typename R = void> class BaseVisitorImpl;
template <class Head, class Tail, typename R>
...
...
@@ -226,18 +228,18 @@ namespace Loki
virtual R visit(Head&, shared_ptr<BaseVisitor>)
{ return R(); }
};
*/
////////////////////////////////////////////////////////////////////////////////
// class template BaseVisitable
////////////////////////////////////////////////////////////////////////////////
/*
template <typename R, typename Visited>
struct DefaultCatchAll
{
static R OnUnknownVisitor(Visited&, BaseVisitor&)
{ return R(); }
};
*/
////////////////////////////////////////////////////////////////////////////////
// class template BaseVisitable
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -322,9 +324,9 @@ struct DefaultCatchAll
/// Put it in every class that you want to make visitable by const member
/// functions (in addition to deriving it from BaseVisitable<R>)
////////////////////////////////////////////////////////////////////////////////
/*
#define LOKI_DEFINE_CONST_VISITABLE() \
virtual ReturnType accept(const shared_ptr<::Loki::BaseVisitor> guest) const \
virtual ReturnType accept(const shared_ptr<
::Loki::BaseVisitor> guest) const \
{ return acceptImpl(*this, guest); }
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -349,17 +351,17 @@ struct DefaultCatchAll
return subObj.visit(host);
}
};
*/
////////////////////////////////////////////////////////////////////////////////
/// \def LOKI_DEFINE_CYCLIC_VISITABLE(SomeVisitor)
/// \ingroup VisitorGroup
/// Put it in every class that you want to make visitable by a cyclic visitor
////////////////////////////////////////////////////////////////////////////////
/*
#define LOKI_DEFINE_CYCLIC_VISITABLE(SomeVisitor) \
virtual SomeVisitor::ReturnType accept(SomeVisitor& guest) \
{ return guest.GenericVisit(*this); }
*/
}
// namespace Loki
typedef
Loki
::
BaseVisitor
XdmfBaseVisitor
;
...
...
utils/XdmfFortran.cpp
View file @
0dee6275
...
...
@@ -103,63 +103,63 @@ namespace {
switch
(
arrayType
)
{
case
XDMF_ARRAY_TYPE_INT8
:
array
->
getValues
(
startIndex
,
static_cast
<
char
*
const
>
(
values
),
static_cast
<
char
*>
(
values
),
numValues
,
arrayStride
,
valuesStride
);
break
;
case
XDMF_ARRAY_TYPE_INT16
:
array
->
getValues
(
startIndex
,
static_cast
<
short
*
const
>
(
values
),
static_cast
<
short
*>
(
values
),
numValues
,
arrayStride
,
valuesStride
);
break
;
case
XDMF_ARRAY_TYPE_INT32
:
array
->
getValues
(
startIndex
,
static_cast
<
int
*
const
>
(
values
),
static_cast
<
int
*>
(
values
),
numValues
,
arrayStride
,
valuesStride
);
break
;
case
XDMF_ARRAY_TYPE_INT64
:
array
->
getValues
(
startIndex
,
static_cast
<
long
*
const
>
(
values
),
static_cast
<
long
*>
(
values
),
numValues
,
arrayStride
,
valuesStride
);
break
;
case
XDMF_ARRAY_TYPE_UINT8
:
array
->
getValues
(
startIndex
,
static_cast
<
unsigned
char
*
const
>
(
values
),
static_cast
<
unsigned
char
*>
(
values
),
numValues
,
arrayStride
,
valuesStride
);
break
;
case
XDMF_ARRAY_TYPE_UINT16
:
array
->
getValues
(
startIndex
,
static_cast
<
unsigned
short
*
const
>
(
values
),
static_cast
<
unsigned
short
*>
(
values
),
numValues
,
arrayStride
,
valuesStride
);
break
;
case
XDMF_ARRAY_TYPE_UINT32
:
array
->
getValues
(
startIndex
,
static_cast
<
unsigned
int
*
const
>
(
values
),
static_cast
<
unsigned
int
*>
(
values
),
numValues
,
arrayStride
,
valuesStride
);
break
;
case
XDMF_ARRAY_TYPE_FLOAT32
:
array
->
getValues
(
startIndex
,
static_cast
<
float
*
const
>
(
values
),
static_cast
<
float
*>
(
values
),
numValues
,
arrayStride
,
valuesStride
);
break
;
case
XDMF_ARRAY_TYPE_FLOAT64
:
array
->
getValues
(
startIndex
,
static_cast
<
double
*
const
>
(
values
),
static_cast
<
double
*>
(
values
),
numValues
,
arrayStride
,
valuesStride
);
...
...
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