From cc3b58b6370f27fb3fb600d6538a542c2fe44d36 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 6 Apr 2015 11:33:29 -0700 Subject: 1023 --- cpp/011load | 4 ++++ cpp/013run | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'cpp') diff --git a/cpp/011load b/cpp/011load index cffcc551..eb8ed8f1 100644 --- a/cpp/011load +++ b/cpp/011load @@ -12,6 +12,10 @@ recipe main [ vector add_recipes(string form) { istringstream in(form); in >> std::noskipws; + return add_recipes(in); +} + +vector add_recipes(istream& in) { vector result; while (!in.eof()) { skip_comments_and_newlines(in); diff --git a/cpp/013run b/cpp/013run index e5da06f3..6888d8f5 100644 --- a/cpp/013run +++ b/cpp/013run @@ -99,7 +99,7 @@ if (argc > 1) { :(code) void load(string filename) { ifstream fin(filename.c_str()); - while (!fin.eof()) add_recipe(fin); + add_recipes(fin); fin.close(); } -- cgit 1.4.1-2-gfad0