but this is about G_VARIANT_TYPE_BYTESTRING which is #defined  in
gvarianttype.h as commented in the original message and casting this
has no effect:
static_cast<const GVariantType *>(G_VARIANT_TYPE_BYTESTRING)

On Tue, Aug 20, 2019 at 4:13 PM Jérôme Godbout <[email protected]> wrote:
>
> You should use static_cast instead of old C cast:
> ((const GVariantType *) "ay")
> should be
> static_cast<const GVariantType *>("ay")
>
>
> -----Original Message-----
> From: Interest <[email protected]> On Behalf Of Damian Ivanov
> Sent: August 20, 2019 5:51 AM
> To: [email protected]
> Subject: [Interest] old style cast
>
> Hello,
>
> What is the correct way to do the following so it doesn't warn about the use 
> of old stylecast?
> //G_VARIANT_TYPE_BYTESTRING = is defined in gvarianttype.h
> // #define G_VARIANT_TYPE_BYTESTRING           ((const GVariantType *) "ay")
> // value is of type GVariant *value
>
> if (g_variant_is_of_type(value, G_VARIANT_TYPE_BYTESTRING)) // warn:
> use of old style cast
>
> Thank you for suggestions.
>
> Regards,
> Damian
> _______________________________________________
> Interest mailing list
> [email protected]
> https://lists.qt-project.org/listinfo/interest
_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest

Reply via email to