[Spice-devel] [PATCH spice-streaming-agent v2 2/4] style: Use C++ style for declaring structs

Frediano Ziglio fziglio at redhat.com
Fri Nov 10 13:08:54 UTC 2017


> 
> From: Christophe de Dinechin <dinechin at redhat.com>
> 
> Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
> ---
>  src/spice-streaming-agent.cpp | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
> index 7f93687..1090517 100644
> --- a/src/spice-streaming-agent.cpp
> +++ b/src/spice-streaming-agent.cpp
> @@ -39,15 +39,17 @@ using namespace SpiceStreamingAgent;
>  
>  static ConcreteAgent agent;
>  
> -typedef struct {
> +struct SpiceStreamFormatMessage
> +{
>      StreamDevHeader hdr;
>      StreamMsgFormat msg;
> -} SpiceStreamFormatMessage;
> +};
>  
> -typedef struct {
> +struct SpiceStreamDataMessage
> +{
>      StreamDevHeader hdr;
>      StreamMsgData msg;
> -} SpiceStreamDataMessage;
> +};
>  
>  static int streaming_requested;
>  static bool quit;

I'm ok about the typedef, for the indentation (brackets) I would add a style
document, in other projects we follow a different style (struct bracket in
the same line).

Frediano


More information about the Spice-devel mailing list