Skip to content

Commit

Permalink
[circle-quantizer] Prevent copy of an object (#12309)
Browse files Browse the repository at this point in the history
This commit prevents copying of an obejct when using auto keyword.

ONE-DCO-1.0-Signed-off-by: seongwoo <[email protected]>
  • Loading branch information
mhs4670go authored Dec 15, 2023
1 parent 24e57e0 commit 790152a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/circle-quantizer/src/CircleQuantizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ LayerParamsSet read_layer_params_set(std::string &filename)

auto layers = qcr.root()["layers"];
// alternate names
for (auto layer : layers)
for (const auto &layer : layers)
{
const std::string key_alt_names = "alternate";
if (layer.isMember(key_alt_names))
{
auto alternate = layer[key_alt_names];
for (auto altkey : alternate.getMemberNames())
for (const auto &altkey : alternate.getMemberNames())
{
LayerParams lps;
for (auto altvalue : alternate[altkey])
for (const auto &altvalue : alternate[altkey])
{
auto l = std::make_shared<LayerParam>();
{
Expand Down

0 comments on commit 790152a

Please sign in to comment.