[coverity] Fix coverity issues
authorDonghyeon Jeong <dhyeon.jeong@samsung.com>
Wed, 31 Jan 2024 06:28:38 +0000 (15:28 +0900)
committerjijoong.moon <jijoong.moon@samsung.com>
Wed, 20 Mar 2024 06:18:05 +0000 (15:18 +0900)
commit0a8fb52d3ec2f0b1cee14ea7b5858b8ce3703293
tree53ef97e4b11d4a94a80952017b40cff0d7a25f0f
parente220e26aee33a2e6322c88f6c2fb8e498445df10
[coverity] Fix coverity issues

This PR resolves the coverity issues that were identified.

**Changes proposed in this PR:**
- Specify the return type of the lambda function
- Use reference to not copy the object.

This fixes:
- Use of auto that causes a copy (AUTO_CAUSES_COPY)

**Self-evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test:   [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Donghyeon Jeong <dhyeon.jeong@samsung.com>
nntrainer/layers/layer_context.h
nntrainer/layers/layer_node.cpp
nntrainer/models/neuralnet.cpp