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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/FloatPolygon.h

Issue 2846303002: Replace ASSERT with DCHECK in platform/ (Closed)
Patch Set: rebase Created 3 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 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 bool Intersection(const VertexPair&, FloatPoint&) const; 105 bool Intersection(const VertexPair&, FloatPoint&) const;
106 }; 106 };
107 107
108 class PLATFORM_EXPORT FloatPolygonEdge final : public VertexPair { 108 class PLATFORM_EXPORT FloatPolygonEdge final : public VertexPair {
109 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 109 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
110 friend class FloatPolygon; 110 friend class FloatPolygon;
111 111
112 public: 112 public:
113 const FloatPoint& Vertex1() const override { 113 const FloatPoint& Vertex1() const override {
114 ASSERT(polygon_); 114 DCHECK(polygon_);
115 return polygon_->VertexAt(vertex_index1_); 115 return polygon_->VertexAt(vertex_index1_);
116 } 116 }
117 117
118 const FloatPoint& Vertex2() const override { 118 const FloatPoint& Vertex2() const override {
119 ASSERT(polygon_); 119 DCHECK(polygon_);
120 return polygon_->VertexAt(vertex_index2_); 120 return polygon_->VertexAt(vertex_index2_);
121 } 121 }
122 122
123 const FloatPolygonEdge& PreviousEdge() const { 123 const FloatPolygonEdge& PreviousEdge() const {
124 ASSERT(polygon_ && polygon_->NumberOfEdges() > 1); 124 ASSERT(polygon_ && polygon_->NumberOfEdges() > 1);
125 return polygon_->EdgeAt((edge_index_ + polygon_->NumberOfEdges() - 1) % 125 return polygon_->EdgeAt((edge_index_ + polygon_->NumberOfEdges() - 1) %
126 polygon_->NumberOfEdges()); 126 polygon_->NumberOfEdges());
127 } 127 }
128 128
129 const FloatPolygonEdge& NextEdge() const { 129 const FloatPolygonEdge& NextEdge() const {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 return String::Format("%p (%f,%f %f,%f)", edge, edge->Vertex1().X(), 161 return String::Format("%p (%f,%f %f,%f)", edge, edge->Vertex1().X(),
162 edge->Vertex1().Y(), edge->Vertex2().X(), 162 edge->Vertex1().Y(), edge->Vertex2().X(),
163 edge->Vertex2().Y()); 163 edge->Vertex2().Y());
164 } 164 }
165 }; 165 };
166 #endif 166 #endif
167 167
168 } // namespace blink 168 } // namespace blink
169 169
170 #endif // FloatPolygon_h 170 #endif // FloatPolygon_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/blob/BlobURL.cpp ('k') | third_party/WebKit/Source/platform/geometry/FloatPolygon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698