Remove unused variables

This commit is contained in:
David Capello 2014-10-25 14:57:49 -03:00
parent 2d8303e174
commit bfe7a637da
7 changed files with 3 additions and 8 deletions

View File

@ -65,7 +65,6 @@ void BackgroundFromLayerCommand::onExecute(Context* context)
{
ContextWriter writer(context);
Document* document(writer.document());
Sprite* sprite(writer.sprite());
{
UndoTransaction undo_transaction(writer.context(), "Background from Layer");

View File

@ -708,6 +708,7 @@ void DocumentApi::moveCel(
ASSERT(dstSprite != NULL);
ASSERT(srcFrame >= 0 && srcFrame < srcSprite->totalFrames());
ASSERT(dstFrame >= 0);
(void)srcSprite; // To avoid unused variable warning on Release mode
clearCel(dstLayer, dstFrame);
addEmptyFramesTo(dstSprite, dstFrame);
@ -777,6 +778,7 @@ void DocumentApi::copyCel(
ASSERT(dstSprite != NULL);
ASSERT(srcFrame >= 0 && srcFrame < srcSprite->totalFrames());
ASSERT(dstFrame >= 0);
(void)srcSprite; // To avoid unused variable warning on Release mode
clearCel(dstLayer, dstFrame);
addEmptyFramesTo(dstSprite, dstFrame);
@ -825,6 +827,7 @@ void DocumentApi::swapCel(
ASSERT(sprite != NULL);
ASSERT(frame1 >= 0 && frame1 < sprite->totalFrames());
ASSERT(frame2 >= 0 && frame2 < sprite->totalFrames());
(void)sprite; // To avoid unused variable warning on Release mode
Cel* cel1 = layer->getCel(frame1);
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())
return;
color_t bgcolor = bgColor(layer);
Sprite* sprite = layer->sprite();
CelIterator it = ((LayerImage*)layer)->getCelBegin();
CelIterator end = ((LayerImage*)layer)->getCelEnd();

View File

@ -145,7 +145,6 @@ static DocumentRange drop_range_op(
dstFrame = dstFrameBegin; srcFrame != srcFrameEnd; ) {
LayerImage* srcLayer = static_cast<LayerImage*>(layers[srcLayerIdx]);
LayerImage* dstLayer = static_cast<LayerImage*>(layers[dstLayerIdx]);
color_t bgcolor = app_get_color_to_clear_layer(dstLayer);
switch (op) {
case Move: api.moveCel(srcLayer, srcFrame, dstLayer, dstFrame); break;

View File

@ -53,7 +53,6 @@ PixelsMovement::PixelsMovement(Context* context,
: m_reader(context)
, m_document(document)
, m_sprite(sprite)
, m_layer(layer)
, m_undoTransaction(context, operationName)
, m_firstDrop(true)
, m_isDragging(false)

View File

@ -112,7 +112,6 @@ namespace app {
const ContextReader m_reader;
Document* m_document;
Sprite* m_sprite;
Layer* m_layer;
UndoTransaction m_undoTransaction;
bool m_firstDrop;
bool m_isDragging;

View File

@ -994,8 +994,6 @@ void Timeline::onAfterLayerChanged(Editor* editor)
void Timeline::setCursor(ui::Message* msg, const gfx::Point& mousePos)
{
int mx = mousePos.x - getBounds().x;
// Scrolling.
if (m_state == STATE_SCROLLING || m_scroll) {
jmouse_set_cursor(kScrollCursor);

View File

@ -246,7 +246,6 @@ void clipboard::paste()
Document* dstDoc = editor->document();
Sprite* dstSpr = dstDoc->sprite();
color_t bgcolor = 0;
switch (get_current_format()) {