Skip to content

Commit ff52956

Browse files
fphammerleWanzenBug
authored andcommitted
fix some clang-tidy cppcoreguidelines-pro-type-member-init warnings
1 parent c0edf90 commit ff52956

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

.clang-tidy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ WarningsAsErrors: >-
3838
*,
3939
-clang-diagnostic-return-type,
4040
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
41-
-cppcoreguidelines-pro-type-member-init,

include/hdf4cpp/HdfAttribute.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class HdfAttribute : public HdfObject {
5151
int32 size() const;
5252

5353
private:
54-
int32 _size;
55-
int32 dataType;
54+
int32 _size{};
55+
int32 dataType{};
5656

5757
void get(void *dest);
5858
int32 getDataType() const;
@@ -81,8 +81,8 @@ class HdfAttribute : public HdfObject {
8181
int32 size() const;
8282

8383
private:
84-
int32 _size;
85-
int32 dataType;
84+
int32 _size{};
85+
int32 dataType{};
8686
void get(void *dest);
8787
int32 getDataType() const;
8888
};

include/hdf4cpp/HdfItem.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class HdfItem : public HdfObject {
216216

217217
private:
218218
int32 _size;
219-
int32 dataType;
219+
int32 dataType{};
220220
std::string name;
221221
std::vector<int32> dims;
222222
};
@@ -332,12 +332,11 @@ class HdfItem : public HdfObject {
332332
}
333333

334334
private:
335-
int32 _size;
336335
std::string name;
337336

338-
int32 nrRecords;
339-
int32 interlace;
340-
int32 recordSize;
337+
int32 nrRecords{};
338+
int32 interlace{};
339+
int32 recordSize{};
341340
};
342341

343342
HdfItem(HdfItemBase *item, int32 sId, int32 vId);

0 commit comments

Comments
 (0)