Add a note about references and pointers to Expression::Load (#708)

* Add a note about references and pointers to Expression::Load

* Formatting

* Remove comma

* Clearer English
This commit is contained in:
Ashley
2021-04-11 20:21:02 +02:00
committed by GitHub
parent 3b4acc5300
commit 98db1dedcd

View File

@@ -676,7 +676,9 @@ impl<W: Write> Writer<W> {
write!(self.out, "{}", name)?;
}
crate::Expression::Load { pointer } => {
//write!(self.out, "*")?;
// We don't do any dereferencing with `*` here as pointer arguments to functions
// are done by `&` references and not `*` pointers. These do not need to be
// dereferenced.
self.put_expression(pointer, context, is_scoped)?;
}
crate::Expression::ImageSample {