Skip to content

Commit

Permalink
[glsl-out] remove redundant space from unary ops
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed Apr 15, 2022
1 parent 7f4e07e commit 8584507
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/back/glsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2475,7 +2475,7 @@ impl<'a, W: Write> Writer<'a, W> {
},
};

write!(self.out, "({} ", operator)?;
write!(self.out, "({}", operator)?;
}
}

Expand Down
14 changes: 7 additions & 7 deletions tests/out/glsl/operators.main.Compute.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ float constructors() {
}

void logical() {
bool unnamed_11 = (! true);
bool unnamed_11 = (!true);
bvec2 unnamed_12 = not(bvec2(true));
bool unnamed_13 = (true || false);
bool unnamed_14 = (true && false);
Expand All @@ -68,8 +68,8 @@ void logical() {
}

void arithmetic() {
ivec2 unnamed_19 = (- ivec2(1));
vec2 unnamed_20 = (- vec2(1.0));
ivec2 unnamed_19 = (-ivec2(1));
vec2 unnamed_20 = (-vec2(1.0));
int unnamed_21 = (2 + 1);
uint unnamed_22 = (2u + 1u);
float unnamed_23 = (2.0 + 1.0);
Expand Down Expand Up @@ -140,10 +140,10 @@ void arithmetic() {
}

void bit() {
int unnamed_88 = (~ 1);
uint unnamed_89 = (~ 1u);
ivec2 unnamed_90 = (~ ivec2(1));
uvec3 unnamed_91 = (~ uvec3(1u));
int unnamed_88 = (~1);
uint unnamed_89 = (~1u);
ivec2 unnamed_90 = (~ivec2(1));
uvec3 unnamed_91 = (~uvec3(1u));
int unnamed_92 = (2 | 1);
uint unnamed_93 = (2u | 1u);
ivec2 unnamed_94 = (ivec2(2) | ivec2(1));
Expand Down

0 comments on commit 8584507

Please sign in to comment.