~ubuntu-branches/ubuntu/intrepid/libcrypto++/intrepid

« back to all changes in this revision

Viewing changes to polynomi.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Machard
  • Date: 2004-08-27 12:35:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040827123505-7evgxiu7k8memiyk
Tags: 5.2.1a-1
* Urgency set to high because lastest upload was unclean
* Rename libcrypto++-5.2.1.orig.tar.gz in  libcrypto++-5.2.1a.orig.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#include "polynomi.h"
8
8
#include "secblock.h"
9
9
 
10
 
#include <strstream>
 
10
#include <strstream>    // can't use <sstream> because GCC 2.95.2 doesn't have it
11
11
#include <iostream>
12
12
 
13
13
NAMESPACE_BEGIN(CryptoPP)
565
565
template <class T, int instance>
566
566
const PolynomialOverFixedRing<T, instance> &PolynomialOverFixedRing<T, instance>::Zero()
567
567
{
568
 
        static const PolynomialOverFixedRing<T, instance> zero;
569
 
        return zero;
 
568
        return Singleton<ThisType>().Ref();
570
569
}
571
570
 
572
571
template <class T, int instance>
573
572
const PolynomialOverFixedRing<T, instance> &PolynomialOverFixedRing<T, instance>::One()
574
573
{
575
 
        static const PolynomialOverFixedRing<T, instance> one = fixedRing.MultiplicativeIdentity();
576
 
        return one;
 
574
        return Singleton<ThisType, NewOnePolynomial>().Ref();
577
575
}
578
576
 
579
577
NAMESPACE_END