@@ -123,7 +123,7 @@ VariablesRequestHandler::Run(const VariablesArguments &arguments) const {
123123 if (!variable.IsValid ())
124124 break ;
125125
126- int64_t frame_var_ref =
126+ const int64_t frame_var_ref =
127127 dap.variables .InsertVariable (variable, /* is_permanent=*/ false );
128128 variables.emplace_back (CreateVariable (
129129 variable, frame_var_ref, hex,
@@ -136,7 +136,8 @@ VariablesRequestHandler::Run(const VariablesArguments &arguments) const {
136136 // children.
137137 lldb::SBValue variable = dap.variables .GetVariable (var_ref);
138138 if (variable.IsValid ()) {
139- bool is_permanent = dap.variables .IsPermanentVariableReference (var_ref);
139+ const bool is_permanent =
140+ dap.variables .IsPermanentVariableReference (var_ref);
140141 auto addChild = [&](lldb::SBValue child,
141142 std::optional<std::string> custom_name = {}) {
142143 if (!child.IsValid ())
@@ -150,7 +151,7 @@ VariablesRequestHandler::Run(const VariablesArguments &arguments) const {
150151 /* is_name_duplicated=*/ false , custom_name));
151152 };
152153 const int64_t num_children = variable.GetNumChildren ();
153- int64_t end_idx = start + ((count == 0 ) ? num_children : count);
154+ const int64_t end_idx = start + ((count == 0 ) ? num_children : count);
154155 int64_t i = start;
155156 for (; i < end_idx && i < num_children; ++i)
156157 addChild (variable.GetChildAtIndex (i));
0 commit comments