From c3f214e5f820d298129e558d64c10e8826bf84ef Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 3 Sep 2016 16:38:40 +0200 Subject: Add --omit-link-check option --- cli/context.cxx | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'cli/context.cxx') diff --git a/cli/context.cxx b/cli/context.cxx index 6e2ac4c..1513e8a 100644 --- a/cli/context.cxx +++ b/cli/context.cxx @@ -2158,21 +2158,24 @@ end_toc () void context:: verify_id_ref () { - bool f (false); - - for (id_set_type::const_iterator i (ref_set.begin ()); - i != ref_set.end (); - ++i) + if (!options.omit_link_check ()) { - if (id_set.find (*i) == id_set.end ()) + bool f (false); + + for (id_set_type::const_iterator i (ref_set.begin ()); + i != ref_set.end (); + ++i) { - cerr << "error: no id for fragment link '#" << *i << "'" << endl; - f = true; + if (id_set.find (*i) == id_set.end ()) + { + cerr << "error: no id for fragment link '#" << *i << "'" << endl; + f = true; + } } - } - if (f) - throw generation_failed (); + if (f) + throw generation_failed (); + } id_set.clear (); ref_set.clear (); -- cgit v1.1