[Mesa-dev] [PATCH] glsl: Initialize parse-state in constructor of lower_subroutine.
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Thu Jul 30 03:37:03 PDT 2015
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
On Wed, 2015-07-29 at 10:53 -0700, Matt Turner wrote:
> Static analysis tools don't like partial object initializations.
> ---
> src/glsl/lower_subroutine.cpp | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/glsl/lower_subroutine.cpp
> b/src/glsl/lower_subroutine.cpp
> index e45ccfe..b29912a 100644
> --- a/src/glsl/lower_subroutine.cpp
> +++ b/src/glsl/lower_subroutine.cpp
> @@ -37,7 +37,8 @@ namespace {
>
> class lower_subroutine_visitor : public ir_hierarchical_visitor {
> public:
> - lower_subroutine_visitor()
> + lower_subroutine_visitor(struct _mesa_glsl_parse_state *state)
> + : state(state)
> {
> this->progress = false;
> }
> @@ -52,8 +53,7 @@ public:
> bool
> lower_subroutine(exec_list *instructions, struct
> _mesa_glsl_parse_state *state)
> {
> - lower_subroutine_visitor v;
> - v.state = state;
> + lower_subroutine_visitor v(state);
> visit_list_elements(&v, instructions);
> return v.progress;
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150730/26d0c677/attachment-0001.sig>
More information about the mesa-dev
mailing list