Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
43ed4020
Commit
43ed4020
authored
Jul 22, 2014
by
Christian Schulte zu Berge
Browse files
Trying to fix linking-related issue when building both OpenIGTLink module and scripting feature.
Fixed various GCC and Cppcheck warnings.
parent
84a914e7
Changes
7
Show whitespace changes
Inline
Side-by-side
modules/base/processors/matrixprocessor.cpp
View file @
43ed4020
...
...
@@ -280,11 +280,10 @@ namespace campvis {
tgt
::
mat4
MatrixProcessor
::
processModifierString
(
tgt
::
mat4
matrix
,
std
::
string
modifiers
)
{
in
t
pos
=
0
;
size_
t
pos
=
0
;
tgt
::
mat4
result
=
matrix
,
tmp
;
while
(
pos
<
modifiers
.
size
())
{
while
(
pos
<
modifiers
.
size
())
{
switch
(
modifiers
[
pos
])
{
case
'I'
:
if
(
!
result
.
invert
(
tmp
))
{
...
...
modules/openigtlink/processors/openigtlinkclient.cpp
View file @
43ed4020
...
...
@@ -341,9 +341,7 @@ namespace campvis {
float
spacing
[
3
];
// spacing (mm/pixel)
int
svsize
[
3
];
// sub-volume size
int
svoffset
[
3
];
// sub-volume offset
int
scalarType
;
// scalar type
scalarType
=
imgMsg
->
GetScalarType
();
imgMsg
->
GetDimensions
(
size
);
imgMsg
->
GetSpacing
(
spacing
);
imgMsg
->
GetSubVolume
(
svsize
,
svoffset
);
...
...
scripting/CMakeLists.txt
View file @
43ed4020
...
...
@@ -69,6 +69,7 @@ MACRO(DECLARE_LUA_MODULE InterfaceFile)
SET_SOURCE_FILES_PROPERTIES
(
${
InterfaceFile
}
PROPERTIES CPLUSPLUS ON
)
SET_SOURCE_FILES_PROPERTIES
(
${
InterfaceFile
}
PROPERTIES SWIG_FLAGS
"-I
${
CampvisHome
}
"
)
LINK_DIRECTORIES
(
${
CampvisGlobalLinkDirectories
}
${
CampvisModulesLinkDirectories
}
)
SWIG_ADD_MODULE
(
${
LuaModName
}
lua
${
InterfaceFile
}
)
SWIG_LINK_LIBRARIES
(
${
LuaModName
}
tgt campvis-core campvis-modules
${
CampvisGlobalExternalLibs
}
)
...
...
@@ -119,6 +120,7 @@ LIST(APPEND CampvisScriptingHeaders "swigluarun.h")
ADD_DEFINITIONS
(
${
CampvisGlobalDefinitions
}
${
CampvisScriptingDefinitions
}
)
INCLUDE_DIRECTORIES
(
${
CampvisGlobalIncludeDirs
}
${
CMAKE_CURRENT_BINARY_DIR
}
)
LINK_DIRECTORIES
(
${
CampvisGlobalLinkDirectories
}
${
CampvisModulesLinkDirectories
}
)
ADD_LIBRARY
(
campvis-scripting STATIC
${
CampvisScriptingSources
}
${
CampvisScriptingHeaders
}
...
...
test/core/datastructures/datacontainertest.cpp
View file @
43ed4020
...
...
@@ -88,9 +88,9 @@ TEST_F(DataContainerTest, miscellaneousTest) {
* Tests the function getDataHandlesCopy.
*/
TEST_F
(
DataContainerTest
,
getDataHandlesCopyTest
)
{
EXPECT_EQ
(
0
,
this
->
_dc0
->
getDataHandlesCopy
().
size
());
EXPECT_EQ
(
0
U
,
this
->
_dc0
->
getDataHandlesCopy
().
size
());
this
->
_dc0
->
addData
(
"data1"
,
this
->
_data
);
EXPECT_EQ
(
1
,
this
->
_dc0
->
getDataHandlesCopy
().
size
());
EXPECT_EQ
(
1
U
,
this
->
_dc0
->
getDataHandlesCopy
().
size
());
std
::
pair
<
std
::
string
,
DataHandle
>
pair
=
this
->
_dc0
->
getDataHandlesCopy
()[
0
];
EXPECT_EQ
(
"data1"
,
pair
.
first
);
EXPECT_EQ
(
this
->
_data
,
pair
.
second
.
getData
());
...
...
test/core/datastructures/imagedatatest.cpp
View file @
43ed4020
...
...
@@ -80,8 +80,8 @@ protected:
TEST_F
(
ImageDataTest
,
miscellaneousTest
)
{
ASSERT_TRUE
(
nullptr
!=
_imgData1
);
EXPECT_EQ
(
2
,
_imgData0
->
getDimensionality
());
EXPECT_EQ
(
4
,
_imgData0
->
getNumChannels
());
EXPECT_EQ
(
2
U
,
_imgData0
->
getDimensionality
());
EXPECT_EQ
(
4
U
,
_imgData0
->
getNumChannels
());
EXPECT_EQ
(
tgt
::
hmul
(
_size
),
_imgData0
->
getNumElements
());
tgt
::
Bounds
bound0
=
_imgData0
->
getWorldBounds
();
...
...
test/core/datastructures/imageseriestest.cpp
View file @
43ed4020
...
...
@@ -71,12 +71,12 @@ protected:
* getImage()
*/
TEST_F
(
ImageSeriesTest
,
miscellaneousTest
)
{
EXPECT_EQ
(
0
,
_imgSeries1
.
getNumImages
());
EXPECT_EQ
(
1
,
_imgSeries2
.
getNumImages
());
EXPECT_EQ
(
1
,
_imgSeries3
.
getNumImages
());
EXPECT_EQ
(
0
U
,
_imgSeries1
.
getNumImages
());
EXPECT_EQ
(
1
U
,
_imgSeries2
.
getNumImages
());
EXPECT_EQ
(
1
U
,
_imgSeries3
.
getNumImages
());
_imgSeries3
.
addImage
(
_image
);
EXPECT_EQ
(
2
,
_imgSeries3
.
getNumImages
());
EXPECT_EQ
(
2
U
,
_imgSeries3
.
getNumImages
());
EXPECT_EQ
(
_dh
.
getData
(),
_imgSeries3
.
getImage
(
_imgSeries3
.
getNumImages
()
-
1
).
getData
());
}
...
...
test/core/properties/stringpropertytest.cpp
View file @
43ed4020
...
...
@@ -107,10 +107,10 @@ TEST_F(StringPropertyTest, sharedPropertyTest) {
// getSharedProperties()
std
::
set
<
AbstractProperty
*>
sharedProps
=
this
->
_strProp1
.
getSharedProperties
();
EXPECT_EQ
(
0
,
sharedProps
.
size
());
EXPECT_EQ
(
0
U
,
sharedProps
.
size
());
this
->
_strProp1
.
addSharedProperty
(
&
this
->
_strProp2
);
sharedProps
=
this
->
_strProp1
.
getSharedProperties
();
EXPECT_EQ
(
1
,
sharedProps
.
size
());
EXPECT_EQ
(
1
U
,
sharedProps
.
size
());
AbstractProperty
*
prop
=
*
sharedProps
.
begin
();
EXPECT_EQ
(
this
->
_strProp2
.
getName
(),
prop
->
getName
());
}
...
...
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