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

Replace Deprecated assert.h Header with cassert #75

Merged
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
4 changes: 2 additions & 2 deletions src/Runnables/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*

Check notice on line 1 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

Run clang-format on src/Runnables/main.cpp

File src/Runnables/main.cpp does not conform to Custom style guidelines. (lines 8, 12, 25, 29, 43, 57, 61, 62, 69, 70, 71, 72, 76, 77, 78, 79, 83, 84, 85, 86, 90, 91, 92, 93, 99, 100, 104, 105, 106, 107, 111, 112, 113, 114, 118, 119, 120, 121, 125, 126, 127, 128, 130, 134, 135, 136, 139, 140, 141, 142, 150, 151, 152, 155, 156, 159, 160, 167, 169, 173, 175, 179, 180, 181, 183, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 204, 205, 206, 207, 208, 211, 214, 217, 223, 224, 225, 226, 227, 228, 229, 230, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 245, 246, 247, 248, 254, 255, 257, 258, 261, 264, 265, 266, 267, 272, 276, 277, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 290, 291, 292, 293, 296, 297, 298, 299, 302, 303, 304, 305, 306, 307, 312, 313, 314, 315, 318, 319, 320, 321, 322, 323, 328, 329, 340, 343, 348, 349, 350, 352, 353, 354, 356, 357, 358, 359, 360, 362, 363, 364, 365, 366, 368, 370, 371, 372, 373)
* main.cpp
*
* Created on: Sep 13, 2018
Expand All @@ -15,7 +15,7 @@
#include <set>
#include <tuple>

#include <QFile>

Check failure on line 18 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:18:10 [clang-diagnostic-error]

'QFile' file not found
#include <QStringList>

#include "DataStructures/Labels/Label.hpp"
Expand All @@ -32,10 +32,10 @@
#include <QApplication>
#include <QCommandLineParser>

#include <memory>
#include <cassert>
#include <cmath>
#include <ctime>
#include <assert.h>
#include <memory>
#include <type_traits>

#include "DataStructures/Networks/PowerGrid.hpp"
Expand All @@ -57,58 +57,58 @@
#include "IO/PowerGridIO.hpp"
#include "IO/Appearance/Color.hpp"

QString inputFile(""), outputDir("");

Check warning on line 60 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:60:9 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'inputFile' is non-const and globally accessible, consider making it const
void addCommandLineOptions ( const QCoreApplication &application,

Check warning on line 61 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:61:54 [misc-unused-parameters]

parameter 'application' is unused
QCommandLineParser &parser )

Check warning on line 62 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:62:54 [misc-unused-parameters]

parameter 'parser' is unused
{
parser.setApplicationDescription("Power Grid Tool");
parser.addHelpOption();
parser.addVersionOption();

#pragma mark COMMANDLINE_OPTIONS
QCommandLineOption algorithmOption(

Check warning on line 69 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:69:24 [cppcoreguidelines-init-variables]

variable 'algorithmOption' is not initialized
"algo",
QCoreApplication::translate("main", "Algorithm for the problem (default: MILP)."),
QCoreApplication::translate("main", "algo"), "MILP"
);
parser.addOption(algorithmOption);

QCommandLineOption variantOption(

Check warning on line 76 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:76:24 [cppcoreguidelines-init-variables]

variable 'variantOption' is not initialized
"variant",
QCoreApplication::translate("main", "Variant for the algorithm (default: ?."),
QCoreApplication::translate("main", "variant"), "?"
);
parser.addOption(variantOption);

QCommandLineOption networkSettingOption(

Check warning on line 83 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:83:24 [cppcoreguidelines-init-variables]

variable 'networkSettingOption' is not initialized
"networkSetting",
QCoreApplication::translate("main", "Network setting (default: exact for PF (not changeable), bounded for DCMPF and DCMTSF)."),
QCoreApplication::translate("main", "networkSetting"), "bounded"
);
parser.addOption(networkSettingOption);

QCommandLineOption solverOption(

Check warning on line 90 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:90:24 [cppcoreguidelines-init-variables]

variable 'solverOption' is not initialized
"solver",
QCoreApplication::translate("main", "Solver if necessary (default: gurobi)."),
QCoreApplication::translate("main", "solver"), "gurobi"
);
parser.addOption(solverOption);

QCommandLineOption inputFileWarmStartOption(

Check warning on line 97 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:97:24 [cppcoreguidelines-init-variables]

variable 'inputFileWarmStartOption' is not initialized
QStringList() << "inputFileWarmStart",
QCoreApplication::translate("main", "Input file for the warm start (default: ../Data/windfarm-benchmarksets/testset-0-instance-1.gml)."),
QCoreApplication::translate("main", "inputFileWarmStart"), "WS-testset-0-instance-1.gml"
);
parser.addOption(inputFileWarmStartOption);

QCommandLineOption timeOption(

Check warning on line 104 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:104:24 [cppcoreguidelines-init-variables]

variable 'timeOption' is not initialized
"time",
QCoreApplication::translate("main", "--time <time> -- specify time limit in seconds (default: 1h)."),
QCoreApplication::translate("main", "time"), "3600"
);
parser.addOption(timeOption);

QCommandLineOption traceSolutionOption(

Check warning on line 111 in src/Runnables/main.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter (ubuntu-latest, Debug, gcc, g++)

src/Runnables/main.cpp:111:24 [cppcoreguidelines-init-variables]

variable 'traceSolutionOption' is not initialized
"trace",
QCoreApplication::translate("main", "--trace <true|false> -- Trace solution. (default: false)."),
QCoreApplication::translate("main", "trace"), "false"
Expand Down
Loading