Skip to content

Commit 0f79fec

Browse files
Avoid unused variable in descriptor.cc
PiperOrigin-RevId: 865700408
1 parent 11b30d3 commit 0f79fec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/google/protobuf/descriptor.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3582,7 +3582,7 @@ class SourceLocationCommentPrinter {
35823582
// Perform the SourceLocation lookup only if we're including user comments,
35833583
// because the lookup is fairly expensive.
35843584
have_source_loc_ =
3585-
options.include_comments && desc->GetSourceLocation(&source_loc_);
3585+
options_.include_comments && desc->GetSourceLocation(&source_loc_);
35863586
}
35873587
SourceLocationCommentPrinter(const FileDescriptor* file,
35883588
const std::vector<int>& path,
@@ -3591,8 +3591,8 @@ class SourceLocationCommentPrinter {
35913591
: options_(options), prefix_(prefix) {
35923592
// Perform the SourceLocation lookup only if we're including user comments,
35933593
// because the lookup is fairly expensive.
3594-
have_source_loc_ =
3595-
options.include_comments && file->GetSourceLocation(path, &source_loc_);
3594+
have_source_loc_ = options_.include_comments &&
3595+
file->GetSourceLocation(path, &source_loc_);
35963596
}
35973597
void AddPreComment(std::string* output) {
35983598
if (have_source_loc_) {

0 commit comments

Comments
 (0)