Common: Remove dead code MediaFile.cast I've deleted the MediaFile.cast method as it is dead code. I confirmed that there is no ill effects on Android from it's removal. I reviewed iOS and BB and it doesn't appear that they call it either.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/9958f6af Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/9958f6af Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/9958f6af Branch: refs/heads/master Commit: 9958f6af8565eb3846ad7e4415d141b6cfed311f Parents: ae75129 Author: macdonst <simon.macdon...@gmail.com> Authored: Tue Aug 21 10:33:17 2012 -0400 Committer: Anis Kadri <anis.ka...@gmail.com> Committed: Fri Aug 24 13:49:58 2012 -0700 ---------------------------------------------------------------------- lib/common/plugin/MediaFile.js | 22 ---------------------- 1 files changed, 0 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/9958f6af/lib/common/plugin/MediaFile.js ---------------------------------------------------------------------- diff --git a/lib/common/plugin/MediaFile.js b/lib/common/plugin/MediaFile.js index 5118e86..a04967a 100644 --- a/lib/common/plugin/MediaFile.js +++ b/lib/common/plugin/MediaFile.js @@ -31,26 +31,4 @@ MediaFile.prototype.getFormatData = function(successCallback, errorCallback) { } }; -// TODO: can we axe this? -/** - * Casts a PluginResult message property (array of objects) to an array of MediaFile objects - * (used in Objective-C and Android) - * - * @param {PluginResult} pluginResult - */ -MediaFile.cast = function(pluginResult) { - var mediaFiles = []; - for (var i=0; i<pluginResult.message.length; i++) { - var mediaFile = new MediaFile(); - mediaFile.name = pluginResult.message[i].name; - mediaFile.fullPath = pluginResult.message[i].fullPath; - mediaFile.type = pluginResult.message[i].type; - mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate; - mediaFile.size = pluginResult.message[i].size; - mediaFiles.push(mediaFile); - } - pluginResult.message = mediaFiles; - return pluginResult; -}; - module.exports = MediaFile;