blob: ebf56f71455c9a7f3fddebd963f18f60758b32a8 [file] [log] [blame] [edit]
Change 58004236 by hwright@hwright:rosie56980077-0446_Rosie:48864:citc on 2013/12/10 18:21:03
Cleanup: Convert from scoped_ptr<T> to std::unique_ptr<T>.
This is part of the unique_ptr migration; for more information see
go/unique_ptr-endgame. Contact unique-ptr-migration@ with questions or
concerns.
NO ACTION REQUIRED: Where possible, this change will be globally approved
by titus@.
Tested:
TAP presubmits for global presubmit queue
http://test/OCL:57894443:BASE:57895567:1386602360560:2599c420
PRESUBMIT=passed
R=titus,jiho
CC=rosie-reviews
APPROVED=jiho,titus-google3-approvals(titus)
DELTA=6 (1 added, 0 deleted, 5 changed)
OCL=57894443
CLEANUP=manage_cl
APPROVALS_REQUIRED=True
MASTER_CL=56980077
Affected files ...
... //depot//src/hunspell/affixmgr.cxx#4 edit
==== //depot//src/hunspell/affixmgr.cxx#3 - /google/src/files/58004236/depot//src/hunspell/affixmgr.cxx ====
--- /google/src/files/53528230/depot//src/hunspell/affixmgr.cxx 2013-10-01 01:04:03.000000000 -0400
+++ /google/src/files/58004236/depot//src/hunspell/affixmgr.cxx 2013-12-10 21:21:03.000000000 -0500
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <ctype.h>
+#include <memory>
#include <vector>
#include "base/scoped_ptr.h"
@@ -1367,11 +1368,11 @@
{
// Note(jiho@google.com): Changed to use scoped_ptr to avoid 64KB stack size
// problem.
- scoped_ptr<signed short[]> scoped_btpp(new signed short[MAXWORDLEN]);
+ std::unique_ptr<signed short[]> scoped_btpp(new signed short[MAXWORDLEN]);
signed short * btpp = scoped_btpp.get(); // metacharacter (*, ?) positions for backtracking
- scoped_ptr<signed short[]> scoped_btwp(new signed short[MAXWORDLEN]);
+ std::unique_ptr<signed short[]> scoped_btwp(new signed short[MAXWORDLEN]);
signed short * btwp = scoped_btwp.get(); // word positions for metacharacters
- scoped_ptr<int[]> scoped_btnum(new int[MAXWORDLEN]);
+ std::unique_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 +1548,7 @@
// Note(jiho@google.com): Changed to use scoped_ptr to avoid 64KB stack size
// problem.
- scoped_ptr<char[]> scoped_st(new char[MAXWORDUTF8LEN + 4]);
+ std::unique_ptr<char[]> scoped_st(new char[MAXWORDUTF8LEN + 4]);
char * st = scoped_st.get();
char ch = '\0';
int cmin;
@@ -2082,7 +2083,7 @@
(struct hentry**) malloc(sizeof(struct hentry*) * (MAXWORDLEN));
// Note(jiho@google.com): Changed to use scoped_ptr to avoid 64KB stack size
// problem.
- scoped_ptr<char[]> scoped_st(new char[MAXWORDUTF8LEN + 4]);
+ std::unique_ptr<char[]> scoped_st(new char[MAXWORDUTF8LEN + 4]);
char * st = scoped_st.get();
char ch;