Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for Ubuntu 22.04 #132

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion actuators/quickset/ptcr/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <boost/asio/io_service.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/serial_port.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/optional.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/static_assert.hpp>
Expand Down
2 changes: 1 addition & 1 deletion batteries/ocean/serial_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <string>
#include <algorithm>
#include <iostream>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <comma/base/exception.h>

using namespace std;
Expand Down
6 changes: 3 additions & 3 deletions batteries/ocean/stdio_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void stdio_query::async_receive(const boost::asio::mutable_buffer& buffer, boost
received_length_ = 0;

input_.async_read_some(boost::asio::buffer(buffer),
boost::bind(&stdio_query::handle_receive, _1, _2, &error_code_, &received_length_));
boost::bind(&stdio_query::handle_receive, boost::placeholders::_1, _2, &error_code_, &received_length_));
}


Expand All @@ -118,10 +118,10 @@ std::size_t stdio_query::receive(const boost::asio::mutable_buffer& buffer,
std::size_t length = 0;

input_.async_read_some(boost::asio::buffer(buffer),
boost::bind(&stdio_query::handle_receive, _1, _2, &ec, &length));
boost::bind(&stdio_query::handle_receive, boost::placeholders::_1, _2, &ec, &length));
// boost::asio::async_read( input_, boost::asio::buffer(buffer),
// boost::asio::transfer_at_least(1),
// boost::bind(&stdio_query::handle_receive, _1, _2, &ec, &length));
// boost::bind(&stdio_query::handle_receive, boost::placeholders::_1, _2, &ec, &length));

// Block until the asynchronous operation has completed.
do io_service_.run_one(); while (ec == boost::asio::error::would_block);
Expand Down
2 changes: 1 addition & 1 deletion batteries/ocean/stdio_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <iostream>
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/asio/deadline_timer.hpp>
#include <boost/asio/posix/stream_descriptor.hpp>
#include <comma/base/types.h>
Expand Down
2 changes: 1 addition & 1 deletion dependencies.commits
Original file line number Diff line number Diff line change
@@ -1 +1 @@
comma,8b6ae0214296a6bf4eafd52ac5dcf18192f80849
comma,dbfeb541ad19c00c46cbae9c7d43b44dbd27c90b
2 changes: 1 addition & 1 deletion graphics/applications/csv_plot/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/// @author Vsevolod Vlaskine

#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include "stream.h"
#include "traits.h"

Expand Down
24 changes: 12 additions & 12 deletions graphics/applications/label_points/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <limits>
#include <map>
#ifndef Q_MOC_RUN
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/lexical_cast.hpp>
#endif
Expand Down Expand Up @@ -63,12 +63,12 @@ MainWindow::MainWindow( const std::string& title, Viewer* viewer )
Actions::Action* saveAsAction = new Actions::Action( "SaveAs...", boost::bind( &MainWindow::saveAs, this ) );
Actions::Action* reloadAction = new Actions::Action( "Reload", boost::bind( &Viewer::reload, viewer ) );

Actions::ToggleAction* navigateSceneAction = new Actions::ToggleAction( QIcon::fromTheme("edit-select", Icons::pointer() ) , "navigate scene", boost::bind( &Tools::Navigate::toggle, boost::ref( viewer->navigate ), _1 ), "Ctrl+Q" );
Actions::ToggleAction* selectPointsAction = new Actions::ToggleAction( QIcon::fromTheme("zoom-select", Icons::select()), "select points", boost::bind( &Tools::SelectClip::toggle, boost::ref( viewer->selectClip ), _1 ), "Ctrl+W" );
Actions::ToggleAction* selectPartitionAction = new Actions::ToggleAction( QIcon::fromTheme("tools-wizard", Icons::fuzzy()), "select partition", boost::bind( &Tools::SelectPartition::toggle, boost::ref( viewer->selectPartition ), _1 ), "Ctrl+E" );
Actions::ToggleAction* selectIdAction = new Actions::ToggleAction( QIcon::fromTheme("tools-wizard", Icons::fuzzy()), "select id", boost::bind( &Tools::SelectPartition::toggle, boost::ref( viewer->selectId ), _1 ), "Ctrl+R" );
Actions::ToggleAction* pipetteAction = new Actions::ToggleAction( QIcon::fromTheme("color-picker", Icons::pipette()), "pick id", boost::bind( &Tools::PickId::toggle, boost::ref( viewer->pickId ), _1 ), "Ctrl+T" );
Actions::ToggleAction* bucketAction = new Actions::ToggleAction( QIcon::fromTheme("fill-color", Icons::bucket()), "set id", boost::bind( &Tools::Fill::toggle, boost::ref( viewer->fill ), _1 ), "Ctrl+Y" );
Actions::ToggleAction* navigateSceneAction = new Actions::ToggleAction( QIcon::fromTheme("edit-select", Icons::pointer() ) , "navigate scene", boost::bind( &Tools::Navigate::toggle, boost::ref( viewer->navigate ), boost::placeholders::_1 ), "Ctrl+Q" );
Actions::ToggleAction* selectPointsAction = new Actions::ToggleAction( QIcon::fromTheme("zoom-select", Icons::select()), "select points", boost::bind( &Tools::SelectClip::toggle, boost::ref( viewer->selectClip ), boost::placeholders::_1 ), "Ctrl+W" );
Actions::ToggleAction* selectPartitionAction = new Actions::ToggleAction( QIcon::fromTheme("tools-wizard", Icons::fuzzy()), "select partition", boost::bind( &Tools::SelectPartition::toggle, boost::ref( viewer->selectPartition ), boost::placeholders::_1 ), "Ctrl+E" );
Actions::ToggleAction* selectIdAction = new Actions::ToggleAction( QIcon::fromTheme("tools-wizard", Icons::fuzzy()), "select id", boost::bind( &Tools::SelectPartition::toggle, boost::ref( viewer->selectId ), boost::placeholders::_1 ), "Ctrl+R" );
Actions::ToggleAction* pipetteAction = new Actions::ToggleAction( QIcon::fromTheme("color-picker", Icons::pipette()), "pick id", boost::bind( &Tools::PickId::toggle, boost::ref( viewer->pickId ), boost::placeholders::_1 ), "Ctrl+T" );
Actions::ToggleAction* bucketAction = new Actions::ToggleAction( QIcon::fromTheme("fill-color", Icons::bucket()), "set id", boost::bind( &Tools::Fill::toggle, boost::ref( viewer->fill ), boost::placeholders::_1 ), "Ctrl+Y" );

selectPointsAction->setToolTip( "select points, click and drag<br>"
"hold Ctrl to add to current selection<br>"
Expand Down Expand Up @@ -139,7 +139,7 @@ MainWindow::MainWindow( const std::string& title, Viewer* viewer )
resize( 640, 480 );

m_viewMenu = menuBar()->addMenu( "View" );
Actions::ToggleAction* action = new Actions::ToggleAction( "File Panel", boost::bind( &MainWindow::toggleFileFrame, this, _1 ) );
Actions::ToggleAction* action = new Actions::ToggleAction( "File Panel", boost::bind( &MainWindow::toggleFileFrame, this, boost::placeholders::_1 ) );
action->setChecked( m_fileFrameVisible );
m_viewMenu->addAction( action );
connect( viewer, SIGNAL( initialized() ), this, SLOT( viewerInitialized() ) );
Expand Down Expand Up @@ -256,11 +256,11 @@ void MainWindow::updateFileFrame()
}
if( !sameFields ) { filename += ": \"" + m_viewer.datasets()[i]->options().fields + "\""; }
m_fileLayout->addWidget( new QLabel( filename.c_str() ), i + 1, 0, Qt::AlignLeft | Qt::AlignTop );
CheckBox* viewBox = new CheckBox( boost::bind( &Viewer::show, boost::ref( m_viewer ), i, _1 ) );
CheckBox* viewBox = new CheckBox( boost::bind( &Viewer::show, boost::ref( m_viewer ), i, boost::placeholders::_1 ) );
viewBox->setCheckState( Qt::Checked );
viewBox->setToolTip( ( std::string( "check to make " ) + filename + " visible" ).c_str() );
m_fileLayout->addWidget( viewBox, i + 1, 1, Qt::AlignRight | Qt::AlignTop );
CheckBox* writeBox = new CheckBox( boost::bind( &Viewer::setWritable, boost::ref( m_viewer ), i, _1 ) );
CheckBox* writeBox = new CheckBox( boost::bind( &Viewer::setWritable, boost::ref( m_viewer ), i, boost::placeholders::_1 ) );
writeBox->setToolTip( ( std::string( "check to make " ) + filename + " writable" ).c_str() );
if( i == 0 ) { writeBox->setCheckState( Qt::Checked ); }
m_fileLayout->addWidget( writeBox, i + 1, 2, Qt::AlignRight | Qt::AlignTop );
Expand All @@ -273,10 +273,10 @@ void MainWindow::updateFileFrame()
for( FileGroupMap::const_iterator it = m_fileGroups.begin(); it != m_fileGroups.end(); ++it, ++i )
{
m_fileLayout->addWidget( new QLabel( ( "\"" + it->first + "\"" ).c_str() ), i, 0, Qt::AlignLeft | Qt::AlignTop );
CheckBox* viewBox = new CheckBox( boost::bind( &MainWindow::showFileGroup, this, it->first, _1 ) );
CheckBox* viewBox = new CheckBox( boost::bind( &MainWindow::showFileGroup, this, it->first, boost::placeholders::_1 ) );
viewBox->setToolTip( ( std::string( "check to make files with fields \"" ) + it->first + "\" visible" ).c_str() );
m_fileLayout->addWidget( viewBox, i, 1, Qt::AlignRight | Qt::AlignTop );
CheckBox* writeBox = new CheckBox( boost::bind( &MainWindow::setWritableFileGroup, this, it->first, _1 ) );
CheckBox* writeBox = new CheckBox( boost::bind( &MainWindow::setWritableFileGroup, this, it->first, boost::placeholders::_1 ) );
writeBox->setToolTip( ( std::string( "check to make files with fields \"" ) + it->first + "\" writable" ).c_str() );
m_fileLayout->addWidget( writeBox, i, 2, Qt::AlignRight | Qt::AlignTop );
m_fileLayout->setRowStretch( i, i + 1 == m_viewer.datasets().size() + fields.size() ? 1 : 0 );
Expand Down
8 changes: 4 additions & 4 deletions graphics/applications/view_points/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ MainWindow::MainWindow( const std::string& title, const std::shared_ptr<snark::g
resize( 640, 480 );

m_viewMenu = menuBar()->addMenu( "View" );
ToggleAction* action = new ToggleAction( "File Panel", boost::bind( &MainWindow::toggleFileFrame, this, _1 ) );
ToggleAction* action = new ToggleAction( "File Panel", boost::bind( &MainWindow::toggleFileFrame, this, boost::placeholders::_1 ) );
action->setChecked( m_fileFrameVisible );
m_viewMenu->addAction( action );
updateFileFrame();
Expand Down Expand Up @@ -158,7 +158,7 @@ void MainWindow::updateFileFrame() // quick and dirty
}
if( !sameFields ) { title += ": \"" + controller->readers[i]->options.fields + "\""; }
m_fileLayout->addWidget( new QLabel( title.c_str() ), i + 1, 0, Qt::AlignLeft | Qt::AlignTop );
CheckBox* viewBox = new CheckBox( boost::bind( &Reader::show, boost::ref( *controller->readers[i] ), _1 ) );
CheckBox* viewBox = new CheckBox( boost::bind( &Reader::show, boost::ref( *controller->readers[i] ), boost::placeholders::_1 ) );
viewBox->setCheckState( controller->readers[i]->show() ? Qt::Checked : Qt::Unchecked );
connect( viewBox, SIGNAL( toggled( bool ) ), this, SLOT( update_view() ) ); // redraw when box is toggled
viewBox->setToolTip( ( std::string( "check to make " ) + title + " visible" ).c_str() );
Expand All @@ -176,7 +176,7 @@ void MainWindow::updateFileFrame() // quick and dirty
for( FileGroupMap::const_iterator it = m_userGroups.begin(); it != m_userGroups.end(); ++it, ++i )
{
m_fileLayout->addWidget( new QLabel( ( "\"" + it->first + "\"" ).c_str() ), i, 0, Qt::AlignLeft | Qt::AlignTop );
CheckBox* viewBox = new CheckBox( boost::bind( &MainWindow::showFileGroup, this, it->first, _1 ) );
CheckBox* viewBox = new CheckBox( boost::bind( &MainWindow::showFileGroup, this, it->first, boost::placeholders::_1 ) );
//viewBox->setCheckState( Qt::Checked );
viewBox->setToolTip( ( std::string( "check to make files within group \"" ) + it->first + "\" visible" ).c_str() );
m_fileLayout->addWidget( viewBox, i, 1, Qt::AlignRight | Qt::AlignTop );
Expand All @@ -186,7 +186,7 @@ void MainWindow::updateFileFrame() // quick and dirty
for( FileGroupMap::const_iterator it = m_fieldsGroups.begin(); it != m_fieldsGroups.end(); ++it, ++i )
{
m_fileLayout->addWidget( new QLabel( ( "\"" + it->first + "\"" ).c_str() ), i, 0, Qt::AlignLeft | Qt::AlignTop );
CheckBox* viewBox = new CheckBox( boost::bind( &MainWindow::showFileGroup, this, it->first, _1 ) );
CheckBox* viewBox = new CheckBox( boost::bind( &MainWindow::showFileGroup, this, it->first, boost::placeholders::_1 ) );
//viewBox->setCheckState( Qt::Checked );
viewBox->setToolTip( ( std::string( "check to make files with fields \"" ) + it->first + "\" visible" ).c_str() );
m_fileLayout->addWidget( viewBox, i, 1, Qt::AlignRight | Qt::AlignTop );
Expand Down
10 changes: 5 additions & 5 deletions imaging/applications/cv-calc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,8 @@ class shapes
bool draw( cv::Mat m ) const
{
if( max.x == 0 && min.x == 0 && max.y == 0 && max.y == 0 ) { return false; }
if( properties.normalized ) { cv::rectangle( m, cv::Point2i( min.x * m.cols, min.y * m.rows ), cv::Point2i( max.x * m.cols, max.y * m.rows ), properties.color, properties.weight ); } // CV_AA );
else { cv::rectangle( m, min, max, properties.color, properties.weight ); } // CV_AA );
if( properties.normalized ) { cv::rectangle( m, cv::Point2i( min.x * m.cols, min.y * m.rows ), cv::Point2i( max.x * m.cols, max.y * m.rows ), properties.color, properties.weight ); } // cv::LINE_AA );
else { cv::rectangle( m, min, max, properties.color, properties.weight ); } // cv::LINE_AA );
return true;
}
};
Expand All @@ -624,8 +624,8 @@ class shapes
bool draw( cv::Mat m ) const
{
if( !comma::math::less( 0, radius ) ) { return false; }
if( properties.normalized ) { cv::circle( m, cv::Point2i( centre.x * m.cols, centre.y * m.rows ), radius * m.cols, properties.color, properties.weight, CV_AA ); }
else { cv::circle( m, centre, radius, properties.color, properties.weight, CV_AA ); }
if( properties.normalized ) { cv::circle( m, cv::Point2i( centre.x * m.cols, centre.y * m.rows ), radius * m.cols, properties.color, properties.weight, cv::LINE_AA ); }
else { cv::circle( m, centre, radius, properties.color, properties.weight, cv::LINE_AA ); }
return true;
}
};
Expand All @@ -638,7 +638,7 @@ class shapes
bool draw( cv::Mat m ) const
{
if( text.empty() ) { return false; }
cv::putText( m, text, properties.normalized ? cv::Point2f( position.x * m.cols, position.y * m.rows ) : position, cv::FONT_HERSHEY_SIMPLEX, 1.0, properties.color, properties.weight, CV_AA );
cv::putText( m, text, properties.normalized ? cv::Point2f( position.x * m.cols, position.y * m.rows ) : position, cv::FONT_HERSHEY_SIMPLEX, 1.0, properties.color, properties.weight, cv::LINE_AA );
return true;
}
};
Expand Down
2 changes: 1 addition & 1 deletion imaging/applications/cv-cat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ int main( int argc, char** argv )
reader.reset( new bursty_reader< pair >( boost::bind( &read, boost::ref( input ), boost::ref( rate ) ), discard, capacity ) );
}
const unsigned int default_delay = vm.count( "file" ) == 0 ? 1 : 200; // HACK to make view work on single files
pipeline_with_header pipeline( output, filters_with_header::make( filters, boost::bind( &get_timestamp_from_header, _1, input.header_binary() ), default_delay ), *reader, number_of_threads );
pipeline_with_header pipeline( output, filters_with_header::make( filters, boost::bind( &get_timestamp_from_header, boost::placeholders::_1, input.header_binary() ), default_delay ), *reader, number_of_threads );
pipeline.run();
if( vm.count( "stay" ) ) { while( !is_shutdown ) { boost::this_thread::sleep( boost::posix_time::seconds( 1 ) ); } }
return 0;
Expand Down
4 changes: 2 additions & 2 deletions imaging/applications/image-accumulate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <limits>
#include <map>
#include <boost/array.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/date_time/posix_time/ptime.hpp>
#include <boost/function.hpp>
#include <boost/optional.hpp>
Expand Down Expand Up @@ -350,7 +350,7 @@ static void output_once_( const boost::posix_time::ptime& t )

static void output_()
{
static const boost::posix_time::time_duration period = boost::posix_time::milliseconds( 1000.0 / *fps );
static const boost::posix_time::time_duration period = boost::posix_time::milliseconds( (long) ( 1000.0 / *fps ) );
static const boost::posix_time::time_duration timeout = boost::posix_time::milliseconds( 10 );
boost::posix_time::ptime time_to_output = boost::posix_time::microsec_clock::universal_time() + period;
while( !is_shutdown && !done && std::cout.good() )
Expand Down
Loading