/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1998--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+ Copyright (C) 1998--2014 Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
patch_ = patch;
}
-Lilypond_version::Lilypond_version (string str)
+Lilypond_version::Lilypond_version (const string &str)
{
- major_ = 0;
+ major_ = 0;
minor_ = 0;
patch_ = 0;
-
+
vector<string> version;
version = string_split (str, '.');
major_ = String_convert::dec2int (version[0]);
if (version.size () > 1 && isdigit (version[1][0]))
minor_ = String_convert::dec2int (version[1]);
-
+
patch_ = 0;
if (version.size () >= 3
&& isdigit (version[2][0]))
Lilypond_version::to_string () const
{
return ::to_string (major_)
- + "." + ::to_string (minor_)
- + "." + ::to_string (patch_);
+ + "." + ::to_string (minor_)
+ + "." + ::to_string (patch_);
}
Lilypond_version::operator int () const