diff options
author | ng0 <ng0@n0.is> | 2019-08-15 09:52:39 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-08-15 09:52:39 +0000 |
commit | 36fb08f81b748620e97d7d8e2d4255b77e78c545 (patch) | |
tree | 19aa5019c9e9cbf53d74e272fddc8cbc48b39e51 /docs/examples/htmltitle.cpp | |
parent | 765f80c1e27acb585eebef46a97ffc769e452879 (diff) | |
parent | aa73eb47bc8583070734696b25b34ad54c2c1f5e (diff) | |
download | gnurl-36fb08f81b748620e97d7d8e2d4255b77e78c545.tar.gz gnurl-36fb08f81b748620e97d7d8e2d4255b77e78c545.tar.bz2 gnurl-36fb08f81b748620e97d7d8e2d4255b77e78c545.zip |
Merge tag 'curl-7_65_3'
7.65.3
Diffstat (limited to 'docs/examples/htmltitle.cpp')
-rw-r--r-- | docs/examples/htmltitle.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/examples/htmltitle.cpp b/docs/examples/htmltitle.cpp index 33163fcd6..bfa27303e 100644 --- a/docs/examples/htmltitle.cpp +++ b/docs/examples/htmltitle.cpp @@ -136,9 +136,9 @@ static void StartElement(void *voidContext, const xmlChar *name, const xmlChar **attributes) { - Context *context = (Context *)voidContext; + Context *context = static_cast<Context *>(voidContext); - if(COMPARE((char *)name, "TITLE")) { + if(COMPARE(reinterpret_cast<char *>(name), "TITLE")) { context->title = ""; context->addTitle = true; } @@ -152,9 +152,9 @@ static void StartElement(void *voidContext, static void EndElement(void *voidContext, const xmlChar *name) { - Context *context = (Context *)voidContext; + Context *context = static_cast<Context *>(voidContext); - if(COMPARE((char *)name, "TITLE")) + if(COMPARE(reinterpret_cast<char *>(name), "TITLE")) context->addTitle = false; } @@ -167,7 +167,7 @@ static void handleCharacters(Context *context, int length) { if(context->addTitle) - context->title.append((char *)chars, length); + context->title.append(reinterpret_cast<char *>(chars), length); } // @@ -178,7 +178,7 @@ static void Characters(void *voidContext, const xmlChar *chars, int length) { - Context *context = (Context *)voidContext; + Context *context = static_cast<Context *>(voidContext); handleCharacters(context, chars, length); } @@ -191,7 +191,7 @@ static void cdata(void *voidContext, const xmlChar *chars, int length) { - Context *context = (Context *)voidContext; + Context *context = static_cast<Context *>(voidContext); handleCharacters(context, chars, length); } |