From: Michael Vrable Date: Sat, 26 Sep 2009 19:09:35 +0000 (-0700) Subject: The map::at method does not always exist, so instead use map::find. X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=commitdiff_plain;h=f38dd9bcb0caffd3fc9126b05788c936690e8288 The map::at method does not always exist, so instead use map::find. Thanks to Achim J. Latz . --- diff --git a/metadata.cc b/metadata.cc index e1ea1aa..2ae0751 100644 --- a/metadata.cc +++ b/metadata.cc @@ -98,7 +98,7 @@ static string encode_dict(const map& dict) string result; if (dict.find("name") != dict.end()) { - result += "name: " + dict.at("name") + "\n"; + result += "name: " + dict.find("name")->second + "\n"; } for (map::const_iterator i = dict.begin();