Skip to content

Commit 111b0f5

Browse files
committed
🎨 style(cpplint): Fix erros
1 parent 9e7eaa5 commit 111b0f5

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

‎CPPLINT.cfg‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
filter=-build/include_order,-whitespace/line_length,-whitespace/access-members,-whitespace/indent,-whitespace/newline,-readability/braces
1+
filter=-build/include_order,-whitespace/line_length,-whitespace/access-members,-whitespace/indent,-whitespace/newline,-readability/braces, -runtime/string
22
linelength=120

‎examples/list_ports.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Example: list serial ports using Ports class
44

55
#include <iostream>
6+
#include <vector>
67

78
#include "libserial/ports.hpp"
89
#include "libserial/device.hpp"

‎include/libserial/device.hpp‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ namespace libserial {
1818
*/
1919
class Device {
2020
public:
21-
2221
/**
2322
* @brief Default constructor of the Device class
2423
*
@@ -104,17 +103,17 @@ void setId(uint16_t id);
104103
/**
105104
* @brief The name of the device
106105
*/
107-
std::string name_;
106+
std::string name_{"unknown"};
108107

109108
/**
110109
* @brief The port path of the device
111110
*/
112-
std::string port_path_;
111+
std::string port_path_{"unknown"};
113112

114113
/**
115114
* @brief The bus path of the device
116115
*/
117-
std::string bus_path_;
116+
std::string bus_path_{"unknown"};
118117

119118
/**
120119
* @brief The unique identifier of the device

‎src/device.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// @ Copyright 2022-2025 Nestor Neto
22

3+
#include <string>
4+
#include <cstdint>
5+
36
#include "libserial/device.hpp"
47

58
namespace libserial {

0 commit comments

Comments
 (0)