aboutsummaryrefslogtreecommitdiff
path: root/samples/amber.cc
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2019-03-22 19:09:14 -0700
committerGitHub <noreply@github.com>2019-03-22 19:09:14 -0700
commitafe0881acf57b7185230601200e1e69df587c88d (patch)
tree2e74380263e6615410d13aeb52083256a7f91fb0 /samples/amber.cc
parentd1984fef30545e26fd7f6558ee64d0079b26956d (diff)
downloadamber-afe0881acf57b7185230601200e1e69df587c88d.tar.gz
Initialize amber structures. (#408)
This CL adds initializers for the amber::Options and amber::BufferInfo structures.
Diffstat (limited to 'samples/amber.cc')
-rw-r--r--samples/amber.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/amber.cc b/samples/amber.cc
index 3fcb01d..3b9e263 100644
--- a/samples/amber.cc
+++ b/samples/amber.cc
@@ -399,7 +399,7 @@ int main(int argc, const char** argv) {
auto pos = options.image_filename.find_last_of('.');
bool usePNG = pos != std::string::npos &&
options.image_filename.substr(pos + 1) == "png";
- for (amber::BufferInfo buffer_info : amber_options.extractions) {
+ for (const amber::BufferInfo& buffer_info : amber_options.extractions) {
if (buffer_info.buffer_name == "framebuffer") {
if (usePNG) {
result = png::ConvertToPNG(buffer_info.width, buffer_info.height,
@@ -435,7 +435,7 @@ int main(int argc, const char** argv) {
std::cerr << "Cannot open file for buffer dump: ";
std::cerr << options.buffer_filename << std::endl;
} else {
- for (amber::BufferInfo buffer_info : amber_options.extractions) {
+ for (const amber::BufferInfo& buffer_info : amber_options.extractions) {
if (buffer_info.buffer_name == "framebuffer")
continue;