Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianPommerening committed Dec 10, 2024
1 parent cd034bf commit 4de84a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/search/tasks/root_task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ void ExplicitOperator::read_pre_post(
utils::TaskParser &task_parser, bool is_axiom) {
bool read_from_single_line = !is_axiom;
vector<FactPair> conditions = read_facts(task_parser, read_from_single_line);
int var = task_parser.read_int("variable affected by " + is_axiom ? "axiom" : "effect");
string source = is_axiom ? "axiom" : "effect";
int var = task_parser.read_int("variable affected by " + source);
int value_pre = task_parser.read_int("variable value precondition");
int value_post = task_parser.read_int("variable value postcondition");
task_parser.confirm_end_of_line();
Expand Down
4 changes: 2 additions & 2 deletions src/search/utils/task_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TaskParser::TaskParser(istream &stream)
}

void TaskParser::find_next_line(bool throw_error_on_failure) {
assert(may_start_line); // We probably forgot a confirm_end_of_line.
assert(may_start_line()); // We probably forgot a confirm_end_of_line.
string next_line;
while (!stream.eof()) {
getline(stream, next_line);
Expand Down Expand Up @@ -85,7 +85,7 @@ int TaskParser::read_int(const string &message) {
return parse_int(token, message);
}

string TaskParser::read_line(const string &message) {
string TaskParser::read_line(const string &/*message*/) {
find_next_line(true);
return line;
}
Expand Down
2 changes: 1 addition & 1 deletion src/search/utils/task_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class TaskParser {
*/
void confirm_end_of_input();
// TODO: Should this be public at all? Or should we add a get_line method?
void error(const std::string &message) const;
NO_RETURN void error(const std::string &message) const;
};
}
#endif

0 comments on commit 4de84a3

Please sign in to comment.