Skip to content

Commit 6c79341

Browse files
Merge pull request #3 from ConstantRobotics-Ltd/add-virtual-destructor
Add virtual destructor
2 parents ea256fd + 0d77187 commit 6c79341

File tree

7 files changed

+23
-6
lines changed

7 files changed

+23
-6
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# **Lens interface C++ library**
66

7-
**v4.3.1**
7+
**v4.4.1**
88

99

1010

@@ -68,6 +68,7 @@
6868
| 4.2.0 | 22.09.2023 | - Updated encode(...) and decode(...) methods of LensParams.<br />- Added decodeAndExecuteCommand(...) method.<br />- Added example of lens controller implementation. |
6969
| 4.3.0 | 26.09.2023 | - Updated getParams methode. |
7070
| 4.3.1 | 13.11.2023 | - Frame class updated. |
71+
| 4.4.1 | 13.12.2023 | - Virtual destructor added.<br />- Frame class updated. |
7172

7273

7374

@@ -112,6 +113,10 @@ src ------------------------------ Folder with source code of the library.
112113
class Lens
113114
{
114115
public:
116+
117+
/// Class destructor.
118+
virtual ~Lens();
119+
115120
/// Get lens class version.
116121
static std::string getVersion();
117122

@@ -184,7 +189,7 @@ std::cout << "Lens class version: " << Lens::getVersion() << std::endl;
184189
Console output:
185190

186191
```bash
187-
Lens class version: 4.3.0
192+
Lens class version: 4.4.1
188193
```
189194

190195

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.13)
66
## INTERFACE-PROJECT
77
## name and version
88
###############################################################################
9-
project(Lens VERSION 4.3.1 LANGUAGES CXX)
9+
project(Lens VERSION 4.4.1 LANGUAGES CXX)
1010

1111

1212

src/Lens.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,13 @@ bool cr::lens::LensParams::decode(uint8_t* data, int dataSize)
980980

981981

982982

983+
cr::lens::Lens::~Lens()
984+
{
985+
986+
}
987+
988+
989+
983990
std::string cr::lens::Lens::getVersion()
984991
{
985992
return LENS_VERSION;

src/Lens.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,11 @@ class Lens
709709
{
710710
public:
711711

712+
/**
713+
* @brief Class destructor.
714+
*/
715+
virtual ~Lens();
716+
712717
/**
713718
* @brief Get lens class version.
714719
* @return Lens class version string in format "Major.Minor.Patch".

src/LensVersion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#define LENS_MAJOR_VERSION 4
4-
#define LENS_MINOR_VERSION 3
4+
#define LENS_MINOR_VERSION 4
55
#define LENS_PATCH_VERSION 1
66

7-
#define LENS_VERSION "4.3.1"
7+
#define LENS_VERSION "4.4.1"

0 commit comments

Comments
 (0)