Skip to content
This repository was archived by the owner on Jul 22, 2026. It is now read-only.

Commit a9d207b

Browse files
author
NeiroYT
committed
nodiscard
1 parent 82a6b00 commit a9d207b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

include/layers/ConvLayer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class ConvolutionalLayer : public Layer {
6969
return res;
7070
}
7171

72-
bool getLegacyImplBool() const { return useLegacyImpl_; }
72+
[[nodiscard]] bool getLegacyImplBool() const { return useLegacyImpl_; }
7373

7474
void run(const std::vector<Tensor>& input,
7575
std::vector<Tensor>& output) override;

test/single_layer/test_convlayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ TEST(ConvolutionalLayerTest, Getters) {
1818
Tensor input2 = make_tensor<float>(vec, {2, 2});
1919
std::vector<Tensor> in{input1, input2};
2020
std::vector<Tensor> output{input1};
21-
EXPECT_NO_THROW(layer.getLegacyImplBool());
22-
EXPECT_NO_THROW(layer.getNumericParams());
23-
EXPECT_NO_THROW(layer.getTensorParams());
21+
EXPECT_NO_THROW(auto ret1 = layer.getLegacyImplBool());
22+
EXPECT_NO_THROW(auto ret2 = layer.getNumericParams());
23+
EXPECT_NO_THROW(auto ret3 = layer.getTensorParams());
2424
}
2525

2626
TEST(ConvolutionalLayerTest, IncompatibleInput) {

0 commit comments

Comments
 (0)