diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-10-01 23:26:55 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-10-01 23:26:55 +0000 |
commit | f66025d59ab4c8c4439fabf6ad89ddf35a19d1fd (patch) | |
tree | 7e576a6400df040d6a03012887615f40a7fd44a1 /include | |
parent | 8459d4e5e32608ec6da3f2b81731aaeb7b038843 (diff) |
Address senorblanco's comments on r600.
Don't inline constructors and destructors.
Include license in test file.
A few nits
Also, cleanup a couple compile warnings.
Review URL: http://codereview.appspot.com/2279043
git-svn-id: http://skia.googlecode.com/svn/trunk@601 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/pdf/SkPDFCatalog.h | 12 | ||||
-rw-r--r-- | include/pdf/SkPDFTypes.h | 38 |
2 files changed, 23 insertions, 27 deletions
diff --git a/include/pdf/SkPDFCatalog.h b/include/pdf/SkPDFCatalog.h index fa159384de..932f1c895b 100644 --- a/include/pdf/SkPDFCatalog.h +++ b/include/pdf/SkPDFCatalog.h @@ -23,19 +23,15 @@ /** \class SkPDFCatalog - The PDF catalog object manages object numbers and when emitted to the - PDF stream, indexes all the objects in the file by offset. + The PDF catalog manages object numbers and file offsets. It is used + to create the PDF cross reference table. */ class SkPDFCatalog { public: /** Create a PDF catalog. */ - SkPDFCatalog() - : fNextObjNum(1), - fStartedAssigningObjNums(false), - fAssigningFirstPageObjNums(false) { - } - virtual ~SkPDFCatalog() {} + SkPDFCatalog(); + ~SkPDFCatalog(); /** Add the passed object to the catalog. * @param obj The object to add. diff --git a/include/pdf/SkPDFTypes.h b/include/pdf/SkPDFTypes.h index 247bd3712e..9324595339 100644 --- a/include/pdf/SkPDFTypes.h +++ b/include/pdf/SkPDFTypes.h @@ -35,8 +35,8 @@ class SkPDFObject : public SkRefCnt { public: /** Create a PDF object. */ - SkPDFObject() {} - virtual ~SkPDFObject() {} + SkPDFObject(); + virtual ~SkPDFObject(); /** Subclasses must implement this method to print the object to the * PDF file. @@ -76,8 +76,8 @@ public: /** Create a reference to an existing SkPDFObject. * @param obj The object to reference. */ - explicit SkPDFObjRef(SkPDFObject* obj) : fObj(obj) {} - virtual ~SkPDFObjRef() {} + explicit SkPDFObjRef(SkPDFObject* obj); + virtual ~SkPDFObjRef(); // The SkPDFObject interface. virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog, @@ -97,8 +97,8 @@ public: /** Create a PDF integer (usually for indirect reference purposes). * @param value An integer value between 2^31 - 1 and -2^31. */ - SkPDFInt(int32_t value) : fValue(value) {} - virtual ~SkPDFInt() {} + explicit SkPDFInt(int32_t value); + virtual ~SkPDFInt(); // The SkPDFObject interface. virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog, @@ -117,8 +117,8 @@ public: /** Create a PDF real number. * @param value A real value. */ - SkPDFScalar(SkScalar value) : fValue(value) {} - virtual ~SkPDFScalar() {} + explicit SkPDFScalar(SkScalar value); + virtual ~SkPDFScalar(); // The SkPDFObject interface. virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog, @@ -137,9 +137,9 @@ public: /** Create a PDF string. Maximum length (in bytes) is 65,535. * @param value A string value. */ - SkPDFString(const char value[]); - SkPDFString(const SkString& value); - virtual ~SkPDFString() {} + explicit SkPDFString(const char value[]); + explicit SkPDFString(const SkString& value); + virtual ~SkPDFString(); // The SkPDFObject interface. virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog, @@ -147,7 +147,7 @@ public: virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect); private: - static const int kMaxLen = 65535; + static const uint32_t kMaxLen = 65535; const SkString fValue; @@ -163,9 +163,9 @@ public: /** Create a PDF name object. Maximum length is 127 bytes. * @param value The name. */ - SkPDFName(const char name[]); - SkPDFName(const SkString& name); - virtual ~SkPDFName() {} + explicit SkPDFName(const char name[]); + explicit SkPDFName(const SkString& name); + virtual ~SkPDFName(); // The SkPDFObject interface. virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog, @@ -173,11 +173,11 @@ public: virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect); private: - static const int kMaxLen = 127; + static const uint32_t kMaxLen = 127; const SkString fValue; - SkString formatName(const SkString& input); + static SkString formatName(const SkString& input); }; /** \class SkPDFArray @@ -188,7 +188,7 @@ class SkPDFArray : public SkPDFObject { public: /** Create a PDF array. Maximum length is 8191. */ - SkPDFArray() {} + SkPDFArray(); virtual ~SkPDFArray(); // The SkPDFObject interface. @@ -234,7 +234,7 @@ class SkPDFDict : public SkPDFObject { public: /** Create a PDF dictionary. Maximum number of entries is 4095. */ - SkPDFDict() {} + SkPDFDict(); virtual ~SkPDFDict(); // The SkPDFObject interface. |