mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-28 16:11:35 +00:00
Remove unused variables
This commit is contained in:
parent
2d8303e174
commit
bfe7a637da
@ -65,7 +65,6 @@ void BackgroundFromLayerCommand::onExecute(Context* context)
|
|||||||
{
|
{
|
||||||
ContextWriter writer(context);
|
ContextWriter writer(context);
|
||||||
Document* document(writer.document());
|
Document* document(writer.document());
|
||||||
Sprite* sprite(writer.sprite());
|
|
||||||
|
|
||||||
{
|
{
|
||||||
UndoTransaction undo_transaction(writer.context(), "Background from Layer");
|
UndoTransaction undo_transaction(writer.context(), "Background from Layer");
|
||||||
|
@ -708,6 +708,7 @@ void DocumentApi::moveCel(
|
|||||||
ASSERT(dstSprite != NULL);
|
ASSERT(dstSprite != NULL);
|
||||||
ASSERT(srcFrame >= 0 && srcFrame < srcSprite->totalFrames());
|
ASSERT(srcFrame >= 0 && srcFrame < srcSprite->totalFrames());
|
||||||
ASSERT(dstFrame >= 0);
|
ASSERT(dstFrame >= 0);
|
||||||
|
(void)srcSprite; // To avoid unused variable warning on Release mode
|
||||||
|
|
||||||
clearCel(dstLayer, dstFrame);
|
clearCel(dstLayer, dstFrame);
|
||||||
addEmptyFramesTo(dstSprite, dstFrame);
|
addEmptyFramesTo(dstSprite, dstFrame);
|
||||||
@ -777,6 +778,7 @@ void DocumentApi::copyCel(
|
|||||||
ASSERT(dstSprite != NULL);
|
ASSERT(dstSprite != NULL);
|
||||||
ASSERT(srcFrame >= 0 && srcFrame < srcSprite->totalFrames());
|
ASSERT(srcFrame >= 0 && srcFrame < srcSprite->totalFrames());
|
||||||
ASSERT(dstFrame >= 0);
|
ASSERT(dstFrame >= 0);
|
||||||
|
(void)srcSprite; // To avoid unused variable warning on Release mode
|
||||||
|
|
||||||
clearCel(dstLayer, dstFrame);
|
clearCel(dstLayer, dstFrame);
|
||||||
addEmptyFramesTo(dstSprite, dstFrame);
|
addEmptyFramesTo(dstSprite, dstFrame);
|
||||||
@ -825,6 +827,7 @@ void DocumentApi::swapCel(
|
|||||||
ASSERT(sprite != NULL);
|
ASSERT(sprite != NULL);
|
||||||
ASSERT(frame1 >= 0 && frame1 < sprite->totalFrames());
|
ASSERT(frame1 >= 0 && frame1 < sprite->totalFrames());
|
||||||
ASSERT(frame2 >= 0 && frame2 < sprite->totalFrames());
|
ASSERT(frame2 >= 0 && frame2 < sprite->totalFrames());
|
||||||
|
(void)sprite; // To avoid unused variable warning on Release mode
|
||||||
|
|
||||||
Cel* cel1 = layer->getCel(frame1);
|
Cel* cel1 = layer->getCel(frame1);
|
||||||
Cel* cel2 = layer->getCel(frame2);
|
Cel* cel2 = layer->getCel(frame2);
|
||||||
@ -933,7 +936,6 @@ void DocumentApi::cropLayer(Layer* layer, int x, int y, int w, int h)
|
|||||||
if (!layer->isImage())
|
if (!layer->isImage())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
color_t bgcolor = bgColor(layer);
|
|
||||||
Sprite* sprite = layer->sprite();
|
Sprite* sprite = layer->sprite();
|
||||||
CelIterator it = ((LayerImage*)layer)->getCelBegin();
|
CelIterator it = ((LayerImage*)layer)->getCelBegin();
|
||||||
CelIterator end = ((LayerImage*)layer)->getCelEnd();
|
CelIterator end = ((LayerImage*)layer)->getCelEnd();
|
||||||
|
@ -145,7 +145,6 @@ static DocumentRange drop_range_op(
|
|||||||
dstFrame = dstFrameBegin; srcFrame != srcFrameEnd; ) {
|
dstFrame = dstFrameBegin; srcFrame != srcFrameEnd; ) {
|
||||||
LayerImage* srcLayer = static_cast<LayerImage*>(layers[srcLayerIdx]);
|
LayerImage* srcLayer = static_cast<LayerImage*>(layers[srcLayerIdx]);
|
||||||
LayerImage* dstLayer = static_cast<LayerImage*>(layers[dstLayerIdx]);
|
LayerImage* dstLayer = static_cast<LayerImage*>(layers[dstLayerIdx]);
|
||||||
color_t bgcolor = app_get_color_to_clear_layer(dstLayer);
|
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case Move: api.moveCel(srcLayer, srcFrame, dstLayer, dstFrame); break;
|
case Move: api.moveCel(srcLayer, srcFrame, dstLayer, dstFrame); break;
|
||||||
|
@ -53,7 +53,6 @@ PixelsMovement::PixelsMovement(Context* context,
|
|||||||
: m_reader(context)
|
: m_reader(context)
|
||||||
, m_document(document)
|
, m_document(document)
|
||||||
, m_sprite(sprite)
|
, m_sprite(sprite)
|
||||||
, m_layer(layer)
|
|
||||||
, m_undoTransaction(context, operationName)
|
, m_undoTransaction(context, operationName)
|
||||||
, m_firstDrop(true)
|
, m_firstDrop(true)
|
||||||
, m_isDragging(false)
|
, m_isDragging(false)
|
||||||
|
@ -112,7 +112,6 @@ namespace app {
|
|||||||
const ContextReader m_reader;
|
const ContextReader m_reader;
|
||||||
Document* m_document;
|
Document* m_document;
|
||||||
Sprite* m_sprite;
|
Sprite* m_sprite;
|
||||||
Layer* m_layer;
|
|
||||||
UndoTransaction m_undoTransaction;
|
UndoTransaction m_undoTransaction;
|
||||||
bool m_firstDrop;
|
bool m_firstDrop;
|
||||||
bool m_isDragging;
|
bool m_isDragging;
|
||||||
|
@ -994,8 +994,6 @@ void Timeline::onAfterLayerChanged(Editor* editor)
|
|||||||
|
|
||||||
void Timeline::setCursor(ui::Message* msg, const gfx::Point& mousePos)
|
void Timeline::setCursor(ui::Message* msg, const gfx::Point& mousePos)
|
||||||
{
|
{
|
||||||
int mx = mousePos.x - getBounds().x;
|
|
||||||
|
|
||||||
// Scrolling.
|
// Scrolling.
|
||||||
if (m_state == STATE_SCROLLING || m_scroll) {
|
if (m_state == STATE_SCROLLING || m_scroll) {
|
||||||
jmouse_set_cursor(kScrollCursor);
|
jmouse_set_cursor(kScrollCursor);
|
||||||
|
@ -246,7 +246,6 @@ void clipboard::paste()
|
|||||||
|
|
||||||
Document* dstDoc = editor->document();
|
Document* dstDoc = editor->document();
|
||||||
Sprite* dstSpr = dstDoc->sprite();
|
Sprite* dstSpr = dstDoc->sprite();
|
||||||
color_t bgcolor = 0;
|
|
||||||
|
|
||||||
switch (get_current_format()) {
|
switch (get_current_format()) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user