Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(18)

Unified Diff: src/common/dwarf/functioninfo.cc

Issue 553002: Remove auto_ptr usage in Breakpad. (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/dwarf/functioninfo.cc
===================================================================
--- src/common/dwarf/functioninfo.cc (revision 1144)
+++ src/common/dwarf/functioninfo.cc (working copy)
@@ -36,10 +36,10 @@
#include <map>
#include <queue>
#include <vector>
-#include <memory>
#include "common/dwarf/functioninfo.h"
#include "common/dwarf/bytereader.h"
+#include "common/scoped_ptr.h"
#include "common/using_std_string.h"
namespace dwarf2reader {
@@ -99,11 +99,11 @@
std::make_pair(files_->at(file_num).name.c_str(),
line_num)));
- if(address < files_->at(file_num).lowpc) {
+ if (address < files_->at(file_num).lowpc) {
files_->at(file_num).lowpc = address;
}
} else {
- fprintf(stderr,"error in AddLine");
+ fprintf(stderr, "error in AddLine");
}
}
@@ -151,7 +151,7 @@
if (current_function_info_) {
if (attr == DW_AT_name)
current_function_info_->name = data;
- else if(attr == DW_AT_MIPS_linkage_name)
+ else if (attr == DW_AT_MIPS_linkage_name)
current_function_info_->mangled_name = data;
}
}
@@ -164,10 +164,9 @@
SectionMap::const_iterator iter = sections_.find("__debug_line");
assert(iter != sections_.end());
- // this should be a scoped_ptr but we dont' use boost :-(
- std::auto_ptr<LineInfo> lireader(new LineInfo(iter->second.first + data,
- iter->second.second - data,
- reader_, linehandler_));
+ scoped_ptr<LineInfo> lireader(new LineInfo(iter->second.first + data,
+ iter->second.second - data,
+ reader_, linehandler_));
lireader->Start();
} else if (current_function_info_) {
switch (attr) {
@@ -208,7 +207,10 @@
current_function_info_->mangled_name = iter->second->mangled_name;
} else {
// If you hit this, this code probably needs to be rewritten.
- fprintf(stderr, "Error: DW_AT_specification was seen before the referenced DIE! (Looking for DIE at offset %08llx, in DIE at offset %08llx)\n", data, offset);
+ fprintf(stderr,
+ "Error: DW_AT_specification was seen before the referenced "
+ "DIE! (Looking for DIE at offset %08llx, in DIE at "
+ "offset %08llx)\n", data, offset);
}
break;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted