blob: 145b9be5017c875ef590a0734d1c931c28875842 [file] [log] [blame] [edit]
Change 53528230 by hwright@hwright:rosie52106145-0178_Rosie:21884:citc on 2013/09/30 22:04:03
Convert uses of scoped_array<T> to scoped_ptr<T[]>. This is in preparation for removing scoped_ptr_array, and converting all uses of scoped_ptr to std::unique_ptr.
In rare cases, this change may convert directly to std::unique_ptr.
NO ACTION REQUIRES: titus@ will globally approve these CLs.
This is part of the scoped_ptr to std::unique_ptr transition, contact
unique_ptr_migration@ for more information.
LSC doc: https://docs.google.com/a/google.com/document/d/1uuy4GpDtJ6nKutse-DcNjYh3tIjN6RsLeyien1gbHA8/edit#
Tested:
TAP presubmits for global presubmit queue
http://test/OCL:53498688:BASE:53503319:1380572748538:ac61f116
All failing tests were failing before this change
PRESUBMIT=passed
R=jiho
CC=rosie-reviews
APPROVED=jiho
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=53498688
CLEANUP=manage_cl
APPROVALS_REQUIRED=True
MASTER_CL=52106145
Affected files ...
... //depot//src/hunspell/affixmgr.cxx#3 edit
==== //depot//src/hunspell/affixmgr.cxx#2 - /google/src/files/53528230/depot//src/hunspell/affixmgr.cxx ====
--- /google/src/files/49864191/depot//src/hunspell/affixmgr.cxx 2013-07-24 23:12:12.000000000 -0400
+++ /google/src/files/53528230/depot//src/hunspell/affixmgr.cxx 2013-10-01 01:04:03.000000000 -0400
@@ -1367,11 +1367,11 @@
{
// Note(jiho@google.com): Changed to use scoped_ptr to avoid 64KB stack size
// problem.
- scoped_array<signed short> scoped_btpp(new signed short[MAXWORDLEN]);
+ scoped_ptr<signed short[]> scoped_btpp(new signed short[MAXWORDLEN]);
signed short * btpp = scoped_btpp.get(); // metacharacter (*, ?) positions for backtracking
- scoped_array<signed short> scoped_btwp(new signed short[MAXWORDLEN]);
+ scoped_ptr<signed short[]> scoped_btwp(new signed short[MAXWORDLEN]);
signed short * btwp = scoped_btwp.get(); // word positions for metacharacters
- scoped_array<int> scoped_btnum(new int[MAXWORDLEN]);
+ scoped_ptr<int[]> scoped_btnum(new int[MAXWORDLEN]);
int * btnum = scoped_btnum.get(); // number of matched characters in metacharacter positions
short bt = 0;
int i, j;
@@ -1547,7 +1547,7 @@
// Note(jiho@google.com): Changed to use scoped_ptr to avoid 64KB stack size
// problem.
- scoped_array<char> scoped_st(new char[MAXWORDUTF8LEN + 4]);
+ scoped_ptr<char[]> scoped_st(new char[MAXWORDUTF8LEN + 4]);
char * st = scoped_st.get();
char ch = '\0';
int cmin;
@@ -2082,7 +2082,7 @@
(struct hentry**) malloc(sizeof(struct hentry*) * (MAXWORDLEN));
// Note(jiho@google.com): Changed to use scoped_ptr to avoid 64KB stack size
// problem.
- scoped_array<char> scoped_st(new char[MAXWORDUTF8LEN + 4]);
+ scoped_ptr<char[]> scoped_st(new char[MAXWORDUTF8LEN + 4]);
char * st = scoped_st.get();
char ch;