File tree Expand file tree Collapse file tree 10 files changed +17
-17
lines changed Expand file tree Collapse file tree 10 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ class TestCaseDriver {
3838 IOManipulator* ioManipulator,
3939 Verifier* verifier,
4040 MultipleTestCasesConfig multipleTestCasesConfig)
41- : ioManipulator_(ioManipulator )
42- , rawIOManipulator_(rawIOManipulator )
41+ : rawIOManipulator_(rawIOManipulator )
42+ , ioManipulator_(ioManipulator )
4343 , verifier_(verifier)
4444 , multipleTestCasesConfig_(move(multipleTestCasesConfig)) {}
4545
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ class Grader {
7777private:
7878 map<int , double > getSubtaskPoints (const GradingOptions& options) {
7979 map<int , double > subtaskPointsByIds;
80- for (int id = 1 ; id <= options.subtaskPoints ().size (); id++) {
80+ for (unsigned id = 1 ; id <= options.subtaskPoints ().size (); id++) {
8181 subtaskPointsByIds[id] = options.subtaskPoints ()[id - 1 ];
8282 }
8383 if (subtaskPointsByIds.empty ()) {
Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ class OperatingSystem {
100100
101101private:
102102 static void runCommand (const string& command) {
103- system (command.c_str ());
103+ int val = system (command.c_str ());
104+ std::cerr << " [tcframe] exit code: " << val << " \n " ;
104105 }
105106};
106107
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ struct Subtask {
3434
3535 Subtask (int id, double points, vector<Constraint> constraints)
3636 : id_(id)
37- , points_(points )
38- , constraints_(move(constraints) ) {}
37+ , constraints_(move(constraints) )
38+ , points_(points ) {}
3939
4040 int id () const {
4141 return id_;
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ namespace tcframe {
3636struct VectorSize {
3737 function<int ()> size;
3838
39- explicit VectorSize (function<int ()> size )
40- : size(move(size )) {}
39+ explicit VectorSize (function<int ()> _size )
40+ : size(move(_size )) {}
4141};
4242
4343template <typename T>
@@ -55,9 +55,9 @@ struct MatrixSize {
5555 function<int ()> rows;
5656 function<int ()> columns;
5757
58- MatrixSize (function<int ()> rows , function<int ()> columns )
59- : rows(move(rows ))
60- , columns(move(columns )) {}
58+ MatrixSize (function<int ()> _rows , function<int ()> _columns )
59+ : rows(move(_rows ))
60+ , columns(move(_columns )) {}
6161};
6262
6363class VariableNamesExtractor {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ struct IOFormat {
4949 if (a.size () != b.size ()) {
5050 return false ;
5151 }
52- for (int i = 0 ; i < a.size (); i++) {
52+ for (unsigned i = 0 ; i < a.size (); i++) {
5353 if (!a[i]->equals (b[i])) {
5454 return false ;
5555 }
@@ -61,7 +61,7 @@ struct IOFormat {
6161 if (a.size () != b.size ()) {
6262 return false ;
6363 }
64- for (int i = 0 ; i < a.size (); i++) {
64+ for (unsigned i = 0 ; i < a.size (); i++) {
6565 if (!equals (a[i], b[i])) {
6666 return false ;
6767 }
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ struct LinesIOSegment : public IOSegment {
4646 if (variables_.size () != o.variables_ .size ()) {
4747 return false ;
4848 }
49- for (int i = 0 ; i < variables_.size (); i++) {
49+ for (unsigned i = 0 ; i < variables_.size (); i++) {
5050 if (!variables_[i]->equals (o.variables_ [i])) {
5151 return false ;
5252 }
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class LinesIOSegmentManipulator {
6565
6666 int size = getSize (segment);
6767 for (int j = 0 ; j < size; j++) {
68- for (int i = 0 ; i < segment->variables ().size (); i++) {
68+ for (unsigned i = 0 ; i < segment->variables ().size (); i++) {
6969 Variable *variable = segment->variables ()[i];
7070 if (variable->type () == VariableType::VECTOR) {
7171 if (i > 0 ) {
Original file line number Diff line number Diff line change @@ -111,7 +111,6 @@ class RawVectorImpl : public VectorImpl<string> {
111111 , var_(&var) {}
112112
113113 void parseAndAddElementFrom (istream* in) {
114- int index = size ();
115114 string element;
116115 Variable::parseRawLine (in, element);
117116 var_->push_back (element);
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ build() {
5454 exit 1
5555 fi
5656
57- g++ -std=c++17 -Wunused -Wall -Wshadow -Wunused -type -O3 -D__TCFRAME_SPEC_FILE__=" \" $SPEC_FILE \" " -I " $TCFRAME_HOME /include" $TCFRAME_CXX_FLAGS -o " $RUNNER_EXEC " " $TCFRAME_HOME /src/tcframe/runner.cpp"
57+ g++ -std=c++17 -Wunused -Wall -Wshadow -Wreturn -type -O3 -D__TCFRAME_SPEC_FILE__=" \" $SPEC_FILE \" " -I " $TCFRAME_HOME /include" $TCFRAME_CXX_FLAGS -o " $RUNNER_EXEC " " $TCFRAME_HOME /src/tcframe/runner.cpp"
5858 echo_colored " Build OK" 32
5959}
6060
You can’t perform that action at this time.
0 commit comments