mirror of git://sigrok.org/pulseview
Use nullptr in some more places.
This patch was generated using clang-tidy: clang-tidy -checks="-*,modernize-use-nullptr" -fix
This commit is contained in:
parent
4a9e84cac4
commit
f74015db20
12
main.cpp
12
main.cpp
|
@ -84,12 +84,12 @@ int main(int argc, char *argv[])
|
|||
// Parse arguments
|
||||
while (1) {
|
||||
static const struct option long_options[] = {
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"version", no_argument, 0, 'V'},
|
||||
{"loglevel", required_argument, 0, 'l'},
|
||||
{"input-file", required_argument, 0, 'i'},
|
||||
{"input-format", required_argument, 0, 'I'},
|
||||
{0, 0, 0, 0}
|
||||
{"help", no_argument, nullptr, 'h'},
|
||||
{"version", no_argument, nullptr, 'V'},
|
||||
{"loglevel", required_argument, nullptr, 'l'},
|
||||
{"input-file", required_argument, nullptr, 'i'},
|
||||
{"input-format", required_argument, nullptr, 'I'},
|
||||
{nullptr, 0, nullptr, 0}
|
||||
};
|
||||
|
||||
const int c = getopt_long(argc, argv,
|
||||
|
|
|
@ -116,7 +116,7 @@ void Signal::populate_popup_form(QWidget *parent, QFormLayout *form)
|
|||
{
|
||||
name_widget_ = new QComboBox(parent);
|
||||
name_widget_->setEditable(true);
|
||||
name_widget_->setCompleter(0);
|
||||
name_widget_->setCompleter(nullptr);
|
||||
|
||||
for (unsigned int i = 0; i < countof(ChannelNames); i++)
|
||||
name_widget_->insertItem(i, ChannelNames[i]);
|
||||
|
|
|
@ -104,7 +104,7 @@ WellArray::WellArray(int rows, int cols, QWidget *parent)
|
|||
: QWidget(parent)
|
||||
,nrows(rows), ncols(cols)
|
||||
{
|
||||
d = 0;
|
||||
d = nullptr;
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
cellw = 28;
|
||||
cellh = 24;
|
||||
|
|
|
@ -42,8 +42,8 @@ bool SignalHandler::prepare_signals()
|
|||
sigemptyset(&sig_action.sa_mask);
|
||||
sig_action.sa_flags = SA_RESTART;
|
||||
|
||||
if (sigaction(SIGINT, &sig_action, 0) != 0 ||
|
||||
sigaction(SIGTERM, &sig_action, 0) != 0) {
|
||||
if (sigaction(SIGINT, &sig_action, nullptr) != 0 ||
|
||||
sigaction(SIGTERM, &sig_action, nullptr) != 0) {
|
||||
close(sockets_[0]);
|
||||
close(sockets_[1]);
|
||||
return false;
|
||||
|
@ -53,7 +53,7 @@ bool SignalHandler::prepare_signals()
|
|||
}
|
||||
|
||||
SignalHandler::SignalHandler(QObject* parent) : QObject(parent),
|
||||
socket_notifier_(0)
|
||||
socket_notifier_(nullptr)
|
||||
{
|
||||
socket_notifier_ = new QSocketNotifier(sockets_[1],
|
||||
QSocketNotifier::Read, this);
|
||||
|
|
Loading…
Reference in New Issue