From b72a1de9a37e79af18a699c38efdadc56454f1cb Mon Sep 17 00:00:00 2001 From: bangerth Date: Sat, 5 Jan 2013 12:12:16 +0000 Subject: [PATCH] Extend Utilities::int_to_string to up to 10 digits. git-svn-id: https://svn.dealii.org/trunk@27931 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/base/utilities.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/deal.II/source/base/utilities.cc b/deal.II/source/base/utilities.cc index 23834cd530..3b0f832fc8 100644 --- a/deal.II/source/base/utilities.cc +++ b/deal.II/source/base/utilities.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011, 2012 by the deal.II authors +// Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -82,12 +82,24 @@ namespace Utilities (digits==3 && i>=1000) || (digits==4 && i>=10000)|| (digits==5 && i>=100000)|| - (i>=1000000)), + (digits==6 && i>=1000000)|| + (digits==7 && i>=10000000)|| + (digits==8 && i>=100000000)|| + (digits==9 && i>=1000000000)|| + (i>=1000000000)), ExcInvalidNumber2StringConversersion(i, digits)); std::string s; switch (digits) { + case 10: + s += '0' + i/1000000000; + case 9: + s += '0' + i/100000000; + case 8: + s += '0' + i/10000000; + case 7: + s += '0' + i/1000000; case 6: s += '0' + i/100000; case 5: -- 2.39.5