From 0272ff1e2fb74123b2fe6ca14ff695ed80f71c47 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sun, 23 Oct 2005 16:41:35 +0000 Subject: [PATCH] const ++ svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=473424 --- libscience/isotope.cpp | 4 ++-- libscience/isotope.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libscience/isotope.cpp b/libscience/isotope.cpp index 420c32c..d02977b 100644 --- a/libscience/isotope.cpp +++ b/libscience/isotope.cpp @@ -22,7 +22,7 @@ #include #include -Isotope::Isotope( int neutrons, int protones, double percentage, double weight, double halflife, QString format, double alphadecay, double betaplusdecay, double betaminusdecay, double ecdecay, double alphapercentage, double betapluspercentage, double betaminuspercentage, double ecpercentage, QString spin, QString magmoment) +Isotope::Isotope( int neutrons, int protones, double percentage, double weight, double halflife, const QString &format, double alphadecay, double betaplusdecay, double betaminusdecay, double ecdecay, double alphapercentage, double betapluspercentage, double betaminuspercentage, double ecpercentage, const QString &spin, const QString &magmoment) { m_neutrons = neutrons; m_protones = protones; @@ -44,7 +44,7 @@ Isotope::Isotope( int neutrons, int protones, double percentage, double weight, m_ecpercentage = ecpercentage; } -QString Isotope::halflifeAsString() +QString Isotope::halflifeAsString() const { QString halflife; diff --git a/libscience/isotope.h b/libscience/isotope.h index feed345..9bd832b 100644 --- a/libscience/isotope.h +++ b/libscience/isotope.h @@ -36,7 +36,7 @@ class Isotope double percentage, double weight, double halflife, - QString format, + const QString &format, double alphadecay, double betaplusdecay, double betaminusdecay, @@ -45,8 +45,8 @@ class Isotope double betapluspercentage, double betaminuspercentage, double ecpercentage, - QString spin, - QString magmoment); + const QString &spin, + const QString &magmoment); bool seconds() const{ if ( m_format == "seconds" ) @@ -136,7 +136,7 @@ class Isotope * appended, for example "seconds" or "years" depending * on the timeframe */ - QString halflifeAsString(); + QString halflifeAsString() const; /** * @return the percentage of the betaminus decay -- 2.47.3