Skip to content

Commit

Permalink
Remove unneeded pointers from memcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakoFox committed Oct 4, 2024
1 parent 3494724 commit 37fdefe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions desktop_version/src/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,7 @@ static void commit_tiles()
info.room_x = ed.levx;
info.room_y = ed.levy;
info.type = EditorUndoType_TILES;
SDL_memcpy(&info.tiles, &ed.old_tiles, sizeof(ed.old_tiles));
SDL_memcpy(info.tiles, ed.old_tiles, sizeof(ed.old_tiles));

ed.undo_buffer.push_back(info);
ed.redo_buffer.clear();
Expand Down Expand Up @@ -2369,7 +2369,7 @@ static void commit_roomdata_tiles_change()
info.room_y = ed.levy;
info.type = EditorUndoType_ROOMDATA_TILES;
update_old_tiles();
SDL_memcpy(&info.tiles, &ed.old_tiles, sizeof(ed.old_tiles));
SDL_memcpy(info.tiles, ed.old_tiles, sizeof(ed.old_tiles));
info.room_data = *cl.getroomprop(ed.levx, ed.levy);

ed.undo_buffer.push_back(info);
Expand Down Expand Up @@ -3375,7 +3375,7 @@ void process_editor_buffer(const bool undo)
cl.settile(ed.levx, ed.levy, x, y, info.tiles[i]);
}

SDL_memcpy(&new_info.tiles, &ed.old_tiles, sizeof(ed.old_tiles));
SDL_memcpy(new_info.tiles, ed.old_tiles, sizeof(ed.old_tiles));

graphics.foregrounddrawn = false;
break;
Expand Down Expand Up @@ -3428,7 +3428,7 @@ void process_editor_buffer(const bool undo)
cl.settile(ed.levx, ed.levy, x, y, info.tiles[i]);
}

SDL_memcpy(&new_info.tiles, &ed.old_tiles, sizeof(ed.old_tiles));
SDL_memcpy(new_info.tiles, ed.old_tiles, sizeof(ed.old_tiles));

new_info.room_data = cl.roomproperties[info.room_x + info.room_y * cl.maxwidth];

Expand Down

0 comments on commit 37fdefe

Please sign in to comment.