Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: src/counters.h

Issue 1940: Replaced calls to functions that msvc consider deprecated. Used... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « SConstruct ('k') | src/counters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/counters.h
===================================================================
--- src/counters.h (revision 280)
+++ src/counters.h (working copy)
@@ -91,13 +91,13 @@
id_(id) {
int len = wcslen(name);
// we prepend the name with 'c:' to indicate that it is a counter.
- name_ = NewArray<wchar_t>(len+3);
- wcscpy(name_, L"c:");
- wcscpy(&name_[2], name);
+ name_ = Vector<wchar_t>::New(len+3);
+ OS::WcsCpy(name_, L"c:");
+ OS::WcsCpy(name_ + 2, name);
};
~StatsCounter() {
- DeleteArray(name_);
+ name_.Dispose();
}
// Sets the counter to a specific value.
@@ -159,11 +159,11 @@
if (lookup_done_)
return ptr_;
lookup_done_ = true;
- ptr_ = StatsTable::FindLocation(name_);
+ ptr_ = StatsTable::FindLocation(name_.start());
return ptr_;
}
- wchar_t* name_;
+ Vector<wchar_t> name_;
bool lookup_done_;
int* ptr_;
int id_;
« no previous file with comments | « SConstruct ('k') | src/counters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698