Skip to content

Commit

Permalink
Fix build under windows when visp namespace enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Jun 7, 2024
1 parent 076f306 commit f95b137
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 42 deletions.
2 changes: 1 addition & 1 deletion modules/core/include/visp3/core/vpImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ void vpImage<Type>::getMinMaxLoc(vpImagePoint *minLoc, vpImagePoint *maxLoc, Typ
*/
template <class Type> vpImage<Type> &vpImage<Type>::operator=(vpImage<Type> other)
{
swap(*this, other);
::swap(*this, other);
if (other.display != nullptr) {
display = other.display;
}
Expand Down
10 changes: 3 additions & 7 deletions modules/io/src/tools/vpKeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ vpKeyboard::vpKeyboard()
init();
}
#else
{}
{ }
#endif



/*!
Stops the raw mode.
*/
Expand All @@ -74,7 +72,6 @@ vpKeyboard::~vpKeyboard()
}

/*!
Get the hit key. kbhit() indicates if a key was hitten.
*/
int vpKeyboard::getchar()
Expand All @@ -91,8 +88,6 @@ int vpKeyboard::getchar()
}

/*!
\return 1 : if a key was hit.
*/
int vpKeyboard::kbhit()
Expand Down Expand Up @@ -163,5 +158,6 @@ void vpKeyboard::setRawMode(bool active)
tcsetattr(STDIN_FILENO, TCSANOW, &initial_settings);
}
}
END_VISP_NAMESPACE
#endif // defined UNIX

END_VISP_NAMESPACE
27 changes: 9 additions & 18 deletions modules/sensor/test/framegrabber/test1394TwoGrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@
*
* Description:
* Firewire cameras video capture.
*
*****************************************************************************/
*/

/*!
\file test1394TwoGrabber.cpp
\brief Aquire images using libdc1394-2.x library.
*/

#include <visp3/core/vpConfig.h>
Expand All @@ -46,22 +44,21 @@
#include <iostream>
#include <string>

#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif

#if defined(VISP_HAVE_DC1394)

#include <visp3/core/vpIoTools.h>
#include <visp3/io/vpImageIo.h>
#include <visp3/sensor/vp1394TwoGrabber.h>

/*!
\example test1394TwoGrabber.cpp
*/
int main()
{
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
try {
std::cout << "IEEE1394 test in progress..." << std::endl;

Expand Down Expand Up @@ -123,14 +120,8 @@ int main()
#else
int main()
{
vpTRACE("Ieee 1394 grabber capabilities are not available...\n"
"You should install libdc1394-2 to use this binary.");
}
vpTRACE("Ieee 1394 grabber capabilities are not available...");
vpTRACE("You should install libdc1394-2 to use this binary.");
}

#endif

/*
* Local variables:
* c-basic-offset: 2
* End:
*/
24 changes: 8 additions & 16 deletions modules/sensor/test/framegrabber/test1394TwoResetBus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,23 @@
*
* Description:
* Firewire cameras video capture.
*
*****************************************************************************/
*/

/*!
\file test1394TwoResetBus.cpp
\brief Resets the IEEE1394 bus using libdc1394-2.x library.
*/

#include <visp3/core/vpConfig.h>
#include <visp3/core/vpDebug.h>

#include <iostream>

#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif

#if defined(VISP_HAVE_DC1394)

#include <visp3/core/vpImage.h>
Expand All @@ -61,13 +63,9 @@
is if a program shuts down uncleanly and needs to free leftover ISO
channels or bandwidth. A bus reset will free those things as a side
effect.
*/
int main()
{
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
try {
std::cout << "IEEE1394 bus reset in progress..." << std::endl;
vp1394TwoGrabber g;
Expand All @@ -86,14 +84,8 @@ int main()
#else
int main()
{
vpTRACE("Ieee 1394 grabber capabilities are not available...\n"
"You should install libdc1394-2 to use this binary.");
}
vpTRACE("Ieee 1394 grabber capabilities are not available...");
vpTRACE("You should install libdc1394-2 to use this binary.");
}

#endif

/*
* Local variables:
* c-basic-offset: 2
* End:
*/

0 comments on commit f95b137

Please sign in to comment.