Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic-graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Olivier Stasse
dynamic-graph
Commits
4a27f334
Commit
4a27f334
authored
12 years ago
by
olivier stasse
Browse files
Options
Downloads
Patches
Plain Diff
Fix -Wcast-qual pulled by -Werror of gcc-4.7
Pointed out by A. Mallet.
parent
5e183343
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
src/command/value.cpp
+16
-16
16 additions, 16 deletions
src/command/value.cpp
with
16 additions
and
16 deletions
src/command/value.cpp
+
16
−
16
View file @
4a27f334
...
...
@@ -71,28 +71,28 @@ namespace dynamicgraph {
{
switch
(
type_
)
{
case
BOOL
:
delete
(
bool
*
)
value_
;
delete
(
const
bool
*
)
value_
;
break
;
case
UNSIGNED
:
delete
(
unsigned
*
)
value_
;
delete
(
const
unsigned
*
)
value_
;
break
;
case
INT
:
delete
(
int
*
)
value_
;
delete
(
const
int
*
)
value_
;
break
;
case
FLOAT
:
delete
(
float
*
)
value_
;
delete
(
const
float
*
)
value_
;
break
;
case
DOUBLE
:
delete
(
double
*
)
value_
;
delete
(
const
double
*
)
value_
;
break
;
case
STRING
:
delete
(
std
::
string
*
)
value_
;
delete
(
const
std
::
string
*
)
value_
;
break
;
case
VECTOR
:
delete
(
Vector
*
)
value_
;
delete
(
const
Vector
*
)
value_
;
break
;
case
MATRIX
:
delete
(
Matrix
*
)
value_
;
delete
(
const
Matrix
*
)
value_
;
break
;
default:
;
}
...
...
@@ -206,7 +206,7 @@ namespace dynamicgraph {
bool
Value
::
boolValue
()
const
{
if
(
type_
==
BOOL
)
return
*
((
bool
*
)
value_
);
return
*
((
const
bool
*
)
value_
);
throw
ExceptionAbstract
(
ExceptionAbstract
::
TOOLS
,
"value is not an bool"
);
}
...
...
@@ -214,7 +214,7 @@ namespace dynamicgraph {
unsigned
Value
::
unsignedValue
()
const
{
if
(
type_
==
UNSIGNED
)
return
*
((
unsigned
*
)
value_
);
return
*
((
const
unsigned
*
)
value_
);
throw
ExceptionAbstract
(
ExceptionAbstract
::
TOOLS
,
"value is not an unsigned int"
);
}
...
...
@@ -222,7 +222,7 @@ namespace dynamicgraph {
int
Value
::
intValue
()
const
{
if
(
type_
==
INT
)
return
*
((
int
*
)
value_
);
return
*
((
const
int
*
)
value_
);
throw
ExceptionAbstract
(
ExceptionAbstract
::
TOOLS
,
"value is not an int int"
);
}
...
...
@@ -233,7 +233,7 @@ namespace dynamicgraph {
if
(
FLOAT
!=
type_
)
throw
ExceptionAbstract
(
ExceptionAbstract
::
TOOLS
,
"value is not a float"
);
result
=
*
((
float
*
)
value_
);
result
=
*
((
const
float
*
)
value_
);
return
result
;
}
...
...
@@ -243,14 +243,14 @@ namespace dynamicgraph {
if
(
DOUBLE
!=
type_
)
throw
ExceptionAbstract
(
ExceptionAbstract
::
TOOLS
,
"value is not a double"
);
result
=
*
((
double
*
)
value_
);
result
=
*
((
const
double
*
)
value_
);
return
result
;
}
std
::
string
Value
::
stringValue
()
const
{
if
(
type_
==
STRING
)
return
*
((
std
::
string
*
)
value_
);
return
*
((
const
std
::
string
*
)
value_
);
throw
ExceptionAbstract
(
ExceptionAbstract
::
TOOLS
,
"value is not an string"
);
}
...
...
@@ -258,7 +258,7 @@ namespace dynamicgraph {
Vector
Value
::
vectorValue
()
const
{
if
(
type_
==
VECTOR
)
return
*
((
Vector
*
)
value_
);
return
*
((
const
Vector
*
)
value_
);
throw
ExceptionAbstract
(
ExceptionAbstract
::
TOOLS
,
"value is not an vector"
);
}
...
...
@@ -266,7 +266,7 @@ namespace dynamicgraph {
Matrix
Value
::
matrixValue
()
const
{
if
(
type_
==
MATRIX
)
return
*
((
Matrix
*
)
value_
);
return
*
((
const
Matrix
*
)
value_
);
throw
ExceptionAbstract
(
ExceptionAbstract
::
TOOLS
,
"value is not a matrix"
);
}
...
...
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