Permalink
Browse files

cleanup: Got rid of ADDON_SCRIPT_LIBRARY, compile warnings, and cosme…

…tics.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30493 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
1 parent ee38bdc commit 9785be909c4fdafc8ef76fc0b3e828bcff0bd3aa jmarshallnz committed May 24, 2010
Showing with 3 additions and 14 deletions.
  1. +0 −1 xbmc/AddonDatabase.cpp
  2. +1 −1 xbmc/GUIDialogAddonInfo.cpp
  3. +0 −7 xbmc/addons/Addon.cpp
  4. +1 −3 xbmc/addons/AddonManager.cpp
  5. +1 −2 xbmc/addons/IAddon.h
View
@@ -111,7 +111,6 @@ int CAddonDatabase::AddAddon(const AddonPtr& addon,
content += ","+TranslateContent(*it);
}
content.erase(0,1);
-
CStdString sql = FormatSQL("insert into addon (id, type, name, summary,"
"description, stars, path, icon, changelog, "
@@ -241,7 +241,7 @@ void CGUIDialogAddonInfo::OnJobComplete(unsigned int jobID, bool success,
if (file.Open("special://temp/"+
CUtil::GetFileName(((CFileOperationJob*)job)->GetItems()[0]->m_strPath)))
{
- char* temp = new char[file.GetLength()+1];
+ char* temp = new char[(size_t)file.GetLength()+1];
file.Read(temp,file.GetLength());
temp[file.GetLength()] = '\0';
m_item->SetProperty("Addon.Changelog",temp);
View
@@ -146,10 +146,6 @@ const CStdString TranslateType(const ADDON::TYPE &type, bool pretty/*=false*/)
return g_localizeStrings.Get(166);
return "xbmc.gui.skin";
}
- case ADDON::ADDON_SCRIPT_LIBRARY:
- {
- return "xbmc.python.library";
- }
case ADDON::ADDON_REPOSITORY:
{
if (pretty)
@@ -174,7 +170,6 @@ const ADDON::TYPE TranslateType(const CStdString &string)
else if (string.Equals("plugin")) return ADDON_PLUGIN;
else if (string.Equals("xbmc.python.script")) return ADDON_SCRIPT;
else if (string.Equals("xbmc.gui.skin")) return ADDON_SKIN;
- else if (string.Equals("xbmc.python.library")) return ADDON_SCRIPT_LIBRARY;
else if (string.Equals("xbmc.addon.repository")) return ADDON_REPOSITORY;
else return ADDON_UNKNOWN;
}
@@ -613,8 +608,6 @@ TYPE CAddonLibrary::SetAddonType()
return ADDON_SCRAPER;
else if (Type() == ADDON_VIZ_LIBRARY)
return ADDON_VIZ;
- else if (Type() == ADDON_SCRIPT_LIBRARY)
- return ADDON_SCRIPT;
else
return ADDON_UNKNOWN;
}
@@ -114,7 +114,6 @@ AddonPtr CAddonMgr::Factory(const cp_extension_t *props)
case ADDON_SKIN:
return AddonPtr(new CSkinInfo(props->plugin));
case ADDON_SCRAPER_LIBRARY:
- case ADDON_SCRIPT_LIBRARY:
case ADDON_VIZ_LIBRARY:
return AddonPtr(new CAddonLibrary(props->plugin));
case ADDON_REPOSITORY:
@@ -473,7 +472,6 @@ AddonPtr CAddonMgr::AddonFromProps(AddonProps& addonProps)
return AddonPtr(new CScreenSaver(addonProps));
case ADDON_SCRAPER_LIBRARY:
case ADDON_VIZ_LIBRARY:
- case ADDON_SCRIPT_LIBRARY:
return AddonPtr(new CAddonLibrary(addonProps));
case ADDON_REPOSITORY:
return AddonPtr(new CRepository(addonProps));
@@ -599,7 +597,7 @@ bool CAddonMgr::LoadAddonDescription(const CStdString &path, AddonPtr &addon)
{
addon = Factory(info->extensions);
m_cpluff->release_info(m_cp_context, info);
- return addon.get();
+ return NULL != addon.get();
}
return false;
}
View
@@ -55,8 +55,7 @@ namespace ADDON
ADDON_PLUGIN,
ADDON_REPOSITORY,
ADDON_VIZ_LIBRARY, // add noninstallable after this and installable before
- ADDON_SCRAPER_LIBRARY,
- ADDON_SCRIPT_LIBRARY,
+ ADDON_SCRAPER_LIBRARY
} TYPE;
class IAddon;

0 comments on commit 9785be9

Please sign in to comment.