[poppler] [PATCH] Declare unmodified arg of Object::isDict as const

Albert Astals Cid aacid at kde.org
Mon Aug 31 11:16:58 PDT 2015


This doesn't really add up anything and makes merging xpdf code harder so 
we're not going to accept this, sorry.

Albert

P.S: For those with time, the whole xpdf 3.04 merge is missing...

El Dilluns, 31 d'agost de 2015, a les 11:58:53, Peter Breitenlohner va 
escriure:
> Since the string argument of Object::isStream and Object::streamIs is
> not modified it should be declared as const.
> 
> Signed-off-by: Peter Breitenlohner <peb at mppmu.mpg.de>
> ---
>  poppler/Object.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/poppler/Object.h b/poppler/Object.h
> index 1b06a3c..90f3258 100644
> --- a/poppler/Object.h
> +++ b/poppler/Object.h
> @@ -186,7 +186,7 @@ public:
>    GBool isName(const char *nameA)
>      { return type == objName && !strcmp(name, nameA); }
>    GBool isDict(const char *dictType);
> -  GBool isStream(char *dictType);
> +  GBool isStream(const char *dictType);
>    GBool isCmd(const char *cmdA)
>      { return type == objCmd && !strcmp(cmd, cmdA); }
> 
> @@ -233,7 +233,7 @@ public:
>    Object *dictGetValNF(int i, Object *obj);
> 
>    // Stream accessors.
> -  GBool streamIs(char *dictType);
> +  GBool streamIs(const char *dictType);
>    void streamReset();
>    void streamClose();
>    int streamGetChar();
> @@ -337,10 +337,10 @@ inline Object *Object::dictGetValNF(int i, Object
> *obj)
> 
>  #include "Stream.h"
> 
> -inline GBool Object::streamIs(char *dictType)
> +inline GBool Object::streamIs(const char *dictType)
>    { OBJECT_TYPE_CHECK(objStream); return stream->getDict()->is(dictType); }
> 
> -inline GBool Object::isStream(char *dictType)
> +inline GBool Object::isStream(const char *dictType)
>    { return type == objStream && streamIs(dictType); }
> 
>  inline void Object::streamReset()



More information about the poppler mailing list