~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-common/libs/utilspp/singleton/LifetimeLibrary.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
utilspp::LifetimeLibraryImpl::LifetimeLibraryImpl()
5
5
        :
6
6
        mTrackerArray (NULL),
7
 
        mNbElements (0)
8
 
{}
 
7
        mNbElements (0) {}
9
8
 
10
 
utilspp::LifetimeLibraryImpl::~LifetimeLibraryImpl()
11
 
{
 
9
utilspp::LifetimeLibraryImpl::~LifetimeLibraryImpl() {
12
10
    terminate();
13
11
}
14
12
 
15
13
void
16
 
utilspp::LifetimeLibraryImpl::add (utilspp::PrivateMembers::LifetimeTracker *tracker)
17
 
{
 
14
utilspp::LifetimeLibraryImpl::add (utilspp::PrivateMembers::LifetimeTracker *tracker) {
18
15
    utilspp::PrivateMembers::TrackerArray newArray = static_cast<
19
16
            utilspp::PrivateMembers::TrackerArray > (std::realloc (mTrackerArray,
20
17
                    mNbElements + 1));
39
36
};
40
37
 
41
38
void
42
 
utilspp::LifetimeLibraryImpl::terminate()
43
 
{
 
39
utilspp::LifetimeLibraryImpl::terminate() {
44
40
    //The number of elements MUST always be equal or over zero.
45
41
    assert (mNbElements >= 0);
46
42
 
64
60
}
65
61
 
66
62
unsigned int
67
 
utilspp::getLongevity (utilspp::LifetimeLibraryImpl *)
68
 
{
 
63
utilspp::getLongevity (utilspp::LifetimeLibraryImpl *) {
69
64
    return 0;
70
65
}
71
66