From 462cb85e3ef4e8633438d7d2e930c0e4eaaa6895 Mon Sep 17 00:00:00 2001 From: angelo Date: Thu, 12 Jun 1997 15:53:39 +0000 Subject: [PATCH] Modificate TPrefix::set_codditta() e TPrefix::test(), in modo da accettare anche 0 come parametro. Lo scopo e' quello di poter salvare nel prefix anche "com". git-svn-id: svn://10.65.10.50/trunk@4630 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/prefix.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/prefix.cpp b/include/prefix.cpp index 5f02ce66b..c3c89baa3 100755 --- a/include/prefix.cpp +++ b/include/prefix.cpp @@ -318,7 +318,9 @@ void TPrefix::put() bool TPrefix::test(long codditta) const { - TString16 s; s.format("%05lda", codditta); + TString16 s("com"); + if (codditta > 0L) + s.format("%05lda", codditta); return test(s); } @@ -335,7 +337,9 @@ bool TPrefix::set_codditta(long codditta, bool force) { if (force || test(codditta)) { - TString16 s; s.format("%05lda", codditta); + TString16 s("com"); + if (codditta > 0L) + s.format("%05lda", codditta); set(s, force); put(); return TRUE;