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

Side by Side Diff: third_party/WebKit/Source/core/editing/state_machines/TextSegmentationMachineState.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/editing/state_machines/TextSegmentationMachineState.h" 5 #include "core/editing/state_machines/TextSegmentationMachineState.h"
6 6
7 #include <ostream> // NOLINT
7 #include "wtf/Assertions.h" 8 #include "wtf/Assertions.h"
8 #include <ostream> // NOLINT
9 9
10 namespace blink { 10 namespace blink {
11 11
12 std::ostream& operator<<(std::ostream& os, TextSegmentationMachineState state) { 12 std::ostream& operator<<(std::ostream& os, TextSegmentationMachineState state) {
13 static const char* const texts[] = { 13 static const char* const texts[] = {
14 "Invalid", "NeedMoreCodeUnit", "NeedFollowingCodeUnit", "Finished", 14 "Invalid", "NeedMoreCodeUnit", "NeedFollowingCodeUnit", "Finished",
15 }; 15 };
16 16
17 const auto& it = std::begin(texts) + static_cast<size_t>(state); 17 const auto& it = std::begin(texts) + static_cast<size_t>(state);
18 DCHECK_GE(it, std::begin(texts)) << "Unknown state value"; 18 DCHECK_GE(it, std::begin(texts)) << "Unknown state value";
19 DCHECK_LT(it, std::end(texts)) << "Unknown state value"; 19 DCHECK_LT(it, std::end(texts)) << "Unknown state value";
20 return os << *it; 20 return os << *it;
21 } 21 }
22 22
23 } // namespace blink 23 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698