~ubuntu-branches/ubuntu/precise/crossroads/precise

« back to all changes in this revision

Viewing changes to xr/config/setinteger.cc

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ritter
  • Date: 2010-07-05 16:27:00 UTC
  • Revision ID: james.westby@ubuntu.com-20100705162700-0g08tfav8ee9y51u
Tags: upstream-2.65
ImportĀ upstreamĀ versionĀ 2.65

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "config"
 
2
 
 
3
int Config::setinteger (string s) const {
 
4
    int ret;
 
5
    if (sscanf (s.c_str(), "%d", &ret) < 1)
 
6
        throw Error("Bad numeric specifier in '" + s + ": not a number");
 
7
    return (ret);
 
8
}