New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OGL: Use unique_ptr instead of pointer when taking screenshot. #1161
Conversation
Can you at least say why this change was made? As a user of Dolphin, that matters to me, and I can't tell from the code alone. |
bool success = TextureToPng(data, W*4, filename, W, H, false); | ||
delete[] data; | ||
FlipImageData(data.data(), W, H, 4); | ||
bool success = TextureToPng(data.data(), W * 4, filename, W, H, false); | ||
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@JMC47 Gets rid of explicit delete usage. |
Good enough for me. |
Would be neater to use a unique_ptr to a u8[] instead of a vector. |
Using a vector zeroes the memory for no reason. I doubt it matters, but don't do that. |
I don't understand. Should the memory not be zero? |
FWIW, I think this is fine with just a vector. |
@rohit-n Yes, the latter. |
@rohit-n would you please change this to a unique_ptr ? |
@skidau I'll try this in the morning. |
@rohit-n would you please rebase on master? |
@rohit-n The pointer type needs to be
not
:) |
@SizzlingCalamari Welcome to Dolphin Sizzling :P |
@RisingFog Oh, Fog, small world huh? 🍕 |
OGL: Use unique_ptr instead of pointer when taking screenshot.
No description provided.