Skip to content

Commit c260499

Browse files
author
Thomas
committed
linting
1 parent 1751b6b commit c260499

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sdk/cmake_scripts/version.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ endif()
1818
if (version_out)
1919
set(VERSION "#include <nabto/webrtc/device.hpp>\n
2020
#include <string>\n
21-
static const std::string version_str = \"${version_out}\"\n;
22-
const std::string nabto::webrtc::SignalingDevice::version() { return version_str; }\n")
21+
#include <array>\n
22+
constexpr std::array<char, 100> version_str {\"${version_out}\"};
23+
std::string nabto::webrtc::SignalingDevice::version() { return {std::begin(version_str),std::end(version_str)}; }\n")
2324

2425
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/version.cpp)
2526
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/src/version.cpp VERSION_)

sdk/src/signaling_device/include/nabto/webrtc/device.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ class SignalingDevice {
623623
*
624624
* @returns String representation of the library version
625625
*/
626-
static const std::string version();
626+
static std::string version();
627627
};
628628

629629
/**

0 commit comments

Comments
 (0)