Fix small build break found on Mac

This commit is contained in:
Phillip Smith 2017-10-24 20:54:37 -07:00
Родитель 2446059951
Коммит 89fa6a2d68
3 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -187,7 +187,7 @@ int ParseAndRun(std::map<std::string, Command>& commands, State& state, int argc
auto option = command->second.Options.find(argv[index]); auto option = command->second.Options.find(argv[index]);
while (option != command->second.Options.end()) while (option != command->second.Options.end())
{ {
char* parameter = ""; char const *parameter = "";
if (option->second.TakesParameter) if (option->second.TakesParameter)
{ {
if (++index == argc) { break; } if (++index == argc) { break; }
@ -208,6 +208,7 @@ int ParseAndRun(std::map<std::string, Command>& commands, State& state, int argc
switch (state.specified) switch (state.specified)
{ {
case UserSpecified::Help:
case UserSpecified::Nothing: case UserSpecified::Nothing:
return Help(argv[0], commands, state); return Help(argv[0], commands, state);
case UserSpecified::Pack: case UserSpecified::Pack:

Просмотреть файл

@ -16,16 +16,16 @@ namespace xPlat {
{ {
public: public:
// TODO: Implement actual XML validation.... // TODO: Implement actual XML validation....
XmlObject(std::shared_ptr<StreamBase>& stream) : m_stream(stream) {} XmlObject(std::shared_ptr<StreamBase> stream) : m_stream(stream) {}
// StreamBase interface is largely pass through. // StreamBase interface is largely pass through.
// XML de-serialization happens during construction, of this object. // XML de-serialization happens during construction, of this object.
// XML serialization happens through // XML serialization happens through
virtual void Write(std::size_t size, const std::uint8_t* bytes) { throw Exception(Error::NotSupported); } virtual void Write(std::size_t size, const std::uint8_t* bytes) { throw Exception(Error::NotSupported); }
virtual std::size_t Read(std::size_t size, const std::uint8_t* bytes) { return m_stream->Read(size, bytes); } virtual std::size_t Read(std::size_t size, const std::uint8_t* bytes) { return m_stream->Read(size, bytes); }
virtual void Seek(std::uint64_t offset, Reference where) { m_stream->Seek(offset,where); } virtual void Seek(std::uint64_t offset, Reference where) { m_stream->Seek(offset,where); }
virtual int Ferror() { return m_stream->Ferror(); } virtual int Ferror() { return m_stream->Ferror(); }
virtual bool Feof() { return m_stream->Feof(); } virtual bool Feof() { return m_stream->Feof(); }
virtual std::uint64_t Ftell() { return m_stream->Ftell(); } virtual std::uint64_t Ftell() { return m_stream->Ftell(); }
// Returns a shared pointer to the DOMDocument representing the contents of this stream // Returns a shared pointer to the DOMDocument representing the contents of this stream

Просмотреть файл

@ -55,24 +55,24 @@ namespace xPlat {
// 1. Get the appx signature from the container and parse it // 1. Get the appx signature from the container and parse it
// TODO: pass validation flags and other necessary goodness through. // TODO: pass validation flags and other necessary goodness through.
m_appxSignature = std::make_unique<AppxSignatureObject>(m_container->GetFile(APPXSIGNATURE_P7X)); m_appxSignature = std::make_unique<AppxSignatureObject>(m_container->GetFile(APPXSIGNATURE_P7X));
ThrowErrorIfNot(Error::AppxMissingSignatureP7X, (m_appxSignature != nullptr), "AppxSignature.p7x not in archive!"); ThrowErrorIf(Error::AppxMissingSignatureP7X, (m_appxSignature == nullptr), "AppxSignature.p7x not in archive!");
// 2. Get content type using signature object for validation // 2. Get content type using signature object for validation
// TODO: switch underlying type of m_contentType to something more specific. // TODO: switch underlying type of m_contentType to something more specific.
m_contentType = std::make_unique<XmlObject>(m_appxSignature->GetValidationStream( m_contentType = std::make_unique<XmlObject>(m_appxSignature->GetValidationStream(
CONTENT_TYPES_XML, m_container->GetFile(CONTENT_TYPES_XML))); CONTENT_TYPES_XML, m_container->GetFile(CONTENT_TYPES_XML)));
ThrowErrorIfNot(Error::AppxMissingContentTypesXML, (m_contentType != nullptr), "[Content_Types].xml not in archive!"); ThrowErrorIf(Error::AppxMissingContentTypesXML, (m_contentType == nullptr), "[Content_Types].xml not in archive!");
// 3. Get blockmap object using signature object for validation // 3. Get blockmap object using signature object for validation
m_appxBlockMap = std::make_unique<AppxBlockMapObject>(m_appxSignature->GetValidationStream( m_appxBlockMap = std::make_unique<AppxBlockMapObject>(m_appxSignature->GetValidationStream(
APPXBLOCKMAP_XML, m_container->GetFile(APPXBLOCKMAP_XML))); APPXBLOCKMAP_XML, m_container->GetFile(APPXBLOCKMAP_XML)));
ThrowErrorIfNot(Error::AppxMissingBlockMapXML, (m_appxBlockMap != nullptr), "AppxBlockMap.xml not in archive!"); ThrowErrorIf(Error::AppxMissingBlockMapXML, (m_appxBlockMap == nullptr), "AppxBlockMap.xml not in archive!");
// 4. Get manifest object using blockmap object for validation // 4. Get manifest object using blockmap object for validation
// TODO: pass validation flags and other necessary goodness through. // TODO: pass validation flags and other necessary goodness through.
m_appxManifest = std::make_unique<AppxManifestObject>(m_appxBlockMap->ValidationStream( m_appxManifest = std::make_unique<AppxManifestObject>(m_appxBlockMap->ValidationStream(
APPXMANIFEST_XML, m_container->GetFile(APPXMANIFEST_XML))); APPXMANIFEST_XML, m_container->GetFile(APPXMANIFEST_XML)));
ThrowErrorIfNot(Error::AppxMissingAppxManifestXML, (m_appxBlockMap != nullptr), "AppxManifest.xml not in archive!"); ThrowErrorIf(Error::AppxMissingAppxManifestXML, (m_appxBlockMap == nullptr), "AppxManifest.xml not in archive!");
std::map<std::string, bool> footPrintFileNames = { std::map<std::string, bool> footPrintFileNames = {
{ APPXBLOCKMAP_XML, false }, { APPXBLOCKMAP_XML, false },