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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp

Issue 1981823002: Remove OwnPtr::release() calls in platform/ (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 Google Inc. All rights reserved. 2 * Copyright (c) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved. 3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 ASSERT(m_numGlyphs >= numGlyphs); 330 ASSERT(m_numGlyphs >= numGlyphs);
331 m_hasVerticalOffsets |= hasVerticalOffsets; 331 m_hasVerticalOffsets |= hasVerticalOffsets;
332 332
333 // The runs are stored in result->m_runs in visual order. For LTR, we place 333 // The runs are stored in result->m_runs in visual order. For LTR, we place
334 // the run to be inserted before the next run with a bigger character 334 // the run to be inserted before the next run with a bigger character
335 // start index. For RTL, we place the run before the next run with a lower 335 // start index. For RTL, we place the run before the next run with a lower
336 // character index. Otherwise, for both directions, at the end. 336 // character index. Otherwise, for both directions, at the end.
337 if (HB_DIRECTION_IS_FORWARD(run->m_direction)) { 337 if (HB_DIRECTION_IS_FORWARD(run->m_direction)) {
338 for (size_t pos = 0; pos < m_runs.size(); ++pos) { 338 for (size_t pos = 0; pos < m_runs.size(); ++pos) {
339 if (m_runs.at(pos)->m_startIndex > run->m_startIndex) { 339 if (m_runs.at(pos)->m_startIndex > run->m_startIndex) {
340 m_runs.insert(pos, run.release()); 340 m_runs.insert(pos, std::move(run));
341 break; 341 break;
342 } 342 }
343 } 343 }
344 } else { 344 } else {
345 for (size_t pos = 0; pos < m_runs.size(); ++pos) { 345 for (size_t pos = 0; pos < m_runs.size(); ++pos) {
346 if (m_runs.at(pos)->m_startIndex < run->m_startIndex) { 346 if (m_runs.at(pos)->m_startIndex < run->m_startIndex) {
347 m_runs.insert(pos, run.release()); 347 m_runs.insert(pos, std::move(run));
348 break; 348 break;
349 } 349 }
350 } 350 }
351 } 351 }
352 // If we didn't find an existing slot to place it, append. 352 // If we didn't find an existing slot to place it, append.
353 if (run) 353 if (run)
354 m_runs.append(run.release()); 354 m_runs.append(std::move(run));
355 } 355 }
356 356
357 } // namespace blink 357 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698