X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flilypond-version.cc;h=e7b686a208e920ac0eda5cfe00b803c8eb6744d0;hb=d490bfce5e0ef8d4f4925692b922409e7b98a22d;hp=e12dbcbea865d94aa526fd19e79c70c21f1f22b4;hpb=64313890b232c731d432e5b096f30bffc3f3756d;p=lilypond.git diff --git a/lily/lilypond-version.cc b/lily/lilypond-version.cc index e12dbcbea8..e7b686a208 100644 --- a/lily/lilypond-version.cc +++ b/lily/lilypond-version.cc @@ -1,16 +1,27 @@ /* - lilypond-version.cc -- implement Lilypond_version + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1998--2011 Jan Nieuwenhuizen - (c) 1998--2006 Jan Nieuwenhuizen + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include -#include "lilypond-input-version.hh" +#include "lilypond-version.hh" #include "string-convert.hh" -#include "std-vector.hh" +#include "misc.hh" Lilypond_version::Lilypond_version (int major, int minor, int patch) { @@ -19,14 +30,14 @@ Lilypond_version::Lilypond_version (int major, int minor, int patch) patch_ = patch; } -Lilypond_version::Lilypond_version (std::string str) +Lilypond_version::Lilypond_version (string str) { major_ = 0; minor_ = 0; patch_ = 0; - std::vector version; - version = String_convert::split (str, '.'); + vector version; + version = string_split (str, '.'); if (version.size () > 0 && isdigit (version[0][0])) major_ = String_convert::dec2int (version[0]); @@ -42,10 +53,12 @@ Lilypond_version::Lilypond_version (std::string str) extra_patch_string_ = version[3]; } -std::string +string Lilypond_version::to_string () const { - return std::to_string (major_) + "." + std::to_string (minor_) + "." + std::to_string (patch_); + return ::to_string (major_) + + "." + ::to_string (minor_) + + "." + ::to_string (patch_); } Lilypond_version::operator int () const