Coverage Report

Created: 2025-08-26 06:57

/src/aspell/common/clone_ptr-t.hpp
Line
Count
Source (jump to first uncovered line)
1
// Copyright (c) 2001
2
// Kevin Atkinson
3
//
4
// Permission to use, copy, modify, distribute and sell this software
5
// and its documentation for any purpose is hereby granted without
6
// fee, provided that the above copyright notice appear in all copies
7
// and that both that copyright notice and this permission notice
8
// appear in supporting documentation. Kevin Atkinson makes no
9
// representations about the suitability of this software for any
10
// purpose.  It is provided "as is" without express or implied
11
// warranty.
12
13
#ifndef autil__clone_ptr_t
14
#define autil__clone_ptr_t
15
16
#include "clone_ptr.hpp"
17
#include <typeinfo>
18
#include "generic_copy_ptr-t.hpp"
19
20
namespace acommon {
21
22
  template <typename T>
23
0
  inline T * ClonePtr<T>::Parms::clone(const T * ptr) const {
24
0
    return ptr->clone();
25
0
  }
26
27
  template <typename T>
28
0
  void ClonePtr<T>::Parms::assign(T * & rhs, const T * lhs) const {
29
0
    if (typeid(*rhs) == typeid(*lhs)) {
30
0
      rhs->assign(lhs);
31
0
    } else {
32
0
      T * temp = rhs;
33
0
      rhs = lhs->clone();
34
0
      delete temp;
35
0
    }
36
0
  }
37
38
  template <typename T>
39
1.83k
  inline void ClonePtr<T>::Parms::del(T * ptr) {
40
1.83k
    delete ptr;
41
1.83k
  }
acommon::ClonePtr<aspeller::Suggest>::Parms::del(aspeller::Suggest*)
Line
Count
Source
39
914
  inline void ClonePtr<T>::Parms::del(T * ptr) {
40
914
    delete ptr;
41
914
  }
acommon::ClonePtr<acommon::Convert>::Parms::del(acommon::Convert*)
Line
Count
Source
39
924
  inline void ClonePtr<T>::Parms::del(T * ptr) {
40
924
    delete ptr;
41
924
  }
Unexecuted instantiation: acommon::ClonePtr<acommon::Enumeration<aspeller::WordEntry*> >::Parms::del(acommon::Enumeration<aspeller::WordEntry*>*)
42
43
}
44
45
#endif