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

Side by Side Diff: src/pdf/SkPDFTypes.h

Issue 1306443004: Use static_assert instead of SK_COMPILE_ASSERT. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 The Android Open Source Project 2 * Copyright 2010 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef SkPDFTypes_DEFINED 9 #ifndef SkPDFTypes_DEFINED
10 #define SkPDFTypes_DEFINED 10 #define SkPDFTypes_DEFINED
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 kObject, 151 kObject,
152 }; 152 };
153 Type fType; 153 Type fType;
154 154
155 SkPDFUnion(Type); 155 SkPDFUnion(Type);
156 // We do not now need copy constructor and copy assignment, so we 156 // We do not now need copy constructor and copy assignment, so we
157 // will disable this functionality. 157 // will disable this functionality.
158 SkPDFUnion& operator=(const SkPDFUnion&) = delete; 158 SkPDFUnion& operator=(const SkPDFUnion&) = delete;
159 SkPDFUnion(const SkPDFUnion&) = delete; 159 SkPDFUnion(const SkPDFUnion&) = delete;
160 }; 160 };
161 SK_COMPILE_ASSERT(sizeof(SkString) == sizeof(void*), SkString_size); 161 static_assert(sizeof(SkString) == sizeof(void*), "SkString_size");
162 162
163 //////////////////////////////////////////////////////////////////////////////// 163 ////////////////////////////////////////////////////////////////////////////////
164 164
165 #if 0 // Enable if needed. 165 #if 0 // Enable if needed.
166 /** This class is a SkPDFUnion with SkPDFObject virtuals attached. 166 /** This class is a SkPDFUnion with SkPDFObject virtuals attached.
167 The only use case of this is when a non-compound PDF object is 167 The only use case of this is when a non-compound PDF object is
168 referenced indirectly. */ 168 referenced indirectly. */
169 class SkPDFAtom : public SkPDFObject { 169 class SkPDFAtom : public SkPDFObject {
170 public: 170 public:
171 void emitObject(SkWStream* stream, 171 void emitObject(SkWStream* stream,
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 SkPDFObject* operator()(SkPDFObject* o) const { 353 SkPDFObject* operator()(SkPDFObject* o) const {
354 return this->getSubstitute(o); 354 return this->getSubstitute(o);
355 } 355 }
356 356
357 private: 357 private:
358 SkTHashMap<SkPDFObject*, SkPDFObject*> fSubstituteMap; 358 SkTHashMap<SkPDFObject*, SkPDFObject*> fSubstituteMap;
359 }; 359 };
360 360
361 #endif 361 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698