[nostalgia/core/studio] Cleanup
This commit is contained in:
parent
98cb3e1670
commit
ec83ed4c7d
@ -579,9 +579,9 @@ void SheetData::save(const studio::Context *ctx, QString ngPath) const {
|
|||||||
void SheetData::setPalette(const NostalgiaPalette *npal) {
|
void SheetData::setPalette(const NostalgiaPalette *npal) {
|
||||||
// load palette
|
// load palette
|
||||||
m_palette.clear();
|
m_palette.clear();
|
||||||
for (std::size_t i = 0; i < npal->colors.size(); i++) {
|
for (const auto &c : npal->colors) {
|
||||||
const auto c = toQColor(npal->colors[i]);
|
const auto qc = toQColor(c);
|
||||||
const auto color = c.name(QColor::HexRgb);
|
const auto color = qc.name(QColor::HexRgb);
|
||||||
m_palette.append(color);
|
m_palette.append(color);
|
||||||
}
|
}
|
||||||
emit paletteChanged();
|
emit paletteChanged();
|
||||||
@ -788,8 +788,8 @@ void SheetData::updatePixels(const NostalgiaGraphic *ng) {
|
|||||||
m_pixels.clear();
|
m_pixels.clear();
|
||||||
m_pixelSelected.clear();
|
m_pixelSelected.clear();
|
||||||
if (ng->bpp == 8) {
|
if (ng->bpp == 8) {
|
||||||
for (std::size_t i = 0; i < ng->pixels.size(); i++) {
|
for (const auto &c : ng->pixels) {
|
||||||
m_pixels.push_back(ng->pixels[i]);
|
m_pixels.push_back(c);
|
||||||
m_pixelSelected.push_back(0);
|
m_pixelSelected.push_back(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user