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

Side by Side Diff: src/utils/SkBase64.h

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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/svg/parser/SkSVGPath.cpp ('k') | src/utils/SkBase64.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 2006 The Android Open Source Project 2 * Copyright 2006 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 #ifndef SkBase64_DEFINED 8 #ifndef SkBase64_DEFINED
9 #define SkBase64_DEFINED 9 #define SkBase64_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 12
13 struct SkBase64 { 13 struct SkBase64 {
14 public: 14 public:
15 enum Error { 15 enum Error {
16 kNoError, 16 kNoError,
17 kPadError, 17 kPadError,
18 kBadCharError 18 kBadCharError
19 }; 19 };
20 20
21 SkBase64(); 21 SkBase64();
22 Error decode(const char* src, size_t length); 22 Error decode(const char* src, size_t length);
23 char* getData() { return fData; } 23 char* getData() { return fData; }
24 /** 24 /**
25 Base64 encodes src into dst. encode is a pointer to at least 65 chars. 25 Base64 encodes src into dst. encode is a pointer to at least 65 chars.
26 encode[64] will be used as the pad character. Encodings other than the 26 encode[64] will be used as the pad character. Encodings other than the
27 default encoding cannot be decoded. 27 default encoding cannot be decoded.
28 */ 28 */
29 static size_t Encode(const void* src, size_t length, void* dest, const char* encode = NULL); 29 static size_t Encode(const void* src, size_t length, void* dest, const char* encode = nullptr);
30 30
31 private: 31 private:
32 Error decode(const void* srcPtr, size_t length, bool writeDestination); 32 Error decode(const void* srcPtr, size_t length, bool writeDestination);
33 33
34 size_t fLength; 34 size_t fLength;
35 char* fData; 35 char* fData;
36 friend class SkImageBaseBitmap; 36 friend class SkImageBaseBitmap;
37 }; 37 };
38 38
39 #endif // SkBase64_DEFINED 39 #endif // SkBase64_DEFINED
OLDNEW
« no previous file with comments | « src/svg/parser/SkSVGPath.cpp ('k') | src/utils/SkBase64.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698