summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:25:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:25:38 +0200
commit3c7a66a031331abdb6ed3134e2f1936a6eb5fbb0 (patch)
treefddfefae8c6a46600c449aad5b7d9382d80b7c3b /hwpfilter
parent9a1909a5d0900211727ac3077116c274c7f7bd8a (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8a8ba86dd78e30146f7b9dd7071f5641d496a67a
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/formula.h2
-rw-r--r--hwpfilter/source/hgzip.cxx6
-rw-r--r--hwpfilter/source/hwpreader.cxx2
-rw-r--r--hwpfilter/source/hwpreader.hxx2
-rw-r--r--hwpfilter/source/lexer.cxx12
5 files changed, 12 insertions, 12 deletions
diff --git a/hwpfilter/source/formula.h b/hwpfilter/source/formula.h
index d0d4f9805c4e..ebdb1acc3b84 100644
--- a/hwpfilter/source/formula.h
+++ b/hwpfilter/source/formula.h
@@ -53,7 +53,7 @@ public:
void setAttributeListImpl( AttributeListImpl *p )
{
pList = p;
- rList = (XAttributeList *) pList;
+ rList = static_cast<XAttributeList *>(pList);
}
int parse();
private:
diff --git a/hwpfilter/source/hgzip.cxx b/hwpfilter/source/hgzip.cxx
index baf3b20e43f5..915ea3135af7 100644
--- a/hwpfilter/source/hgzip.cxx
+++ b/hwpfilter/source/hgzip.cxx
@@ -61,9 +61,9 @@ gz_stream *gz_open(HStream & _stream)
s = static_cast<gz_stream *>(ALLOC(sizeof(gz_stream)));
if (!s)
return Z_NULL;
- s->stream.zalloc = (alloc_func) 0;
- s->stream.zfree = (free_func) 0;
- s->stream.opaque = (voidpf) 0;
+ s->stream.zalloc = nullptr;
+ s->stream.zfree = nullptr;
+ s->stream.opaque = nullptr;
s->stream.next_in = s->inbuf = Z_NULL;
s->stream.next_out = s->outbuf = Z_NULL;
s->stream.avail_in = s->stream.avail_out = 0;
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index bcdf9d154640..a68a29b294b4 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -112,7 +112,7 @@ struct HwpReaderPrivate
HwpReader::HwpReader()
{
pList = new AttributeListImpl;
- rList = (XAttributeList *) pList;
+ rList = static_cast<XAttributeList *>(pList);
d = new HwpReaderPrivate;
}
diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx
index bb4e0d283101..15baadd89f09 100644
--- a/hwpfilter/source/hwpreader.hxx
+++ b/hwpfilter/source/hwpreader.hxx
@@ -189,7 +189,7 @@ Reference< XInterface > HwpImportFilter_CreateInstance(
{
HwpImportFilter *p = new HwpImportFilter( rSMgr );
- return Reference< XInterface > ( (OWeakObject* )p );
+ return Reference< XInterface > ( static_cast<OWeakObject*>(p) );
}
Sequence< OUString > HwpImportFilter::getSupportedServiceNames_Static() throw ()
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index 9c7cea8820b7..341bebb31aa2 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -203,7 +203,7 @@ static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = nullptr;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
@@ -230,7 +230,7 @@ static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+FILE *yyin = nullptr, *yyout = nullptr;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
@@ -1590,7 +1590,7 @@ static int yy_get_next_buffer()
b->yy_ch_buf = static_cast<char *>(
/* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
+ yy_flex_realloc( static_cast<void *>(b->yy_ch_buf),
b->yy_buf_size + 2 ));
}
else
@@ -1811,12 +1811,12 @@ YY_BUFFER_STATE b;
return;
if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
+ yy_current_buffer = nullptr;
if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
+ yy_flex_free( static_cast<void *>(b->yy_ch_buf) );
- yy_flex_free( (void *) b );
+ yy_flex_free( static_cast<void *>(b) );
}