Skip to content

Commit

Permalink
added Qt pro and test.cpp; fixes to make it build under c++11
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochus Keller committed Apr 18, 2021
1 parent acef084 commit 7383b0e
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ bool Class::Traverse(Callback& callback) const
}
std::string Class::AdornGenerics(PELib& peLib, bool names) const
{
std::unique_ptr<std::iostream> hold = std::make_unique<std::stringstream>();
std::unique_ptr<std::iostream> hold( new std::stringstream() );
peLib.Swap(hold);
if (generic_.size())
{
Expand Down Expand Up @@ -518,4 +518,4 @@ bool Class::MatchesGeneric(std::deque<Type*>* generics) const
}
return false;
}
} // namespace DotNetPELib
} // namespace DotNetPELib
4 changes: 2 additions & 2 deletions MethodSignature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ void MethodSignature::Load(PELib& lib, AssemblyDef& assembly, PEReader& reader,
}
std::string MethodSignature::AdornGenerics(PELib& peLib, bool names) const
{
std::unique_ptr<std::iostream> hold = std::make_unique<std::stringstream>();
std::unique_ptr<std::iostream> hold( new std::stringstream() );
peLib.Swap(hold);
if (generic_.size())
{
Expand Down Expand Up @@ -611,4 +611,4 @@ std::string MethodSignature::AdornGenerics(PELib& peLib, bool names) const
peLib.Swap(hold);
return static_cast<std::stringstream&>(*hold).str();
}
} // namespace DotNetPELib
} // namespace DotNetPELib
4 changes: 2 additions & 2 deletions PELib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ AssemblyDef* PELib::EmptyWorkingAssembly(const std::string& AssemblyName)
bool PELib::DumpOutputFile(const std::string& file, OutputMode mode, bool gui)
{
bool rv;
outputStream_ = std::make_unique<std::fstream>(file.c_str(), std::ios::in | std::ios::out | std::ios::trunc |
(mode == ilasm || mode == object ? std::ios::in : std::ios::binary));
outputStream_ = std::unique_ptr<std::iostream>( new std::fstream(file.c_str(), std::ios::in | std::ios::out | std::ios::trunc |
(mode == ilasm || mode == object ? std::ios::in : std::ios::binary)) );
switch (mode)
{
case ilasm:
Expand Down
60 changes: 60 additions & 0 deletions PeLib.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

QT += core
QT -= gui

TARGET = PeLib
TEMPLATE = app

CONFIG += c++11 # use of auto

HEADERS += \
bigdigits.h \
bigdtypes.h \
DLLExportReader.h \
DotNetPELib.h \
MZHeader.h \
PEFile.h \
RSAEncoder.h \
PEHeader.h \
sha1.h \
targetver.h

SOURCES += \
Allocator.cpp \
AssemblyDef.cpp \
bigdigits.cpp \
Class.cpp \
CodeContainer.cpp \
CreateGUID.cpp \
CustomAttributeContainer.cpp \
DataContainer.cpp \
DLLExportReader.cpp \
Enum.cpp \
Field.cpp \
Instruction.cpp \
Method.cpp \
MethodSignature.cpp \
NameSpace.cpp \
NetSignature.cpp \
Operand.cpp \
PECor20Headers.cpp \
PELib.cpp \
PELibError.cpp \
PEReader.cpp \
PEWriter.cpp \
Property.cpp \
Qualifiers.cpp \
RSAEncoder.cpp \
sha1.cpp \
Type.cpp \
Value.cpp \
test.cpp

DISTFILES +=







5 changes: 5 additions & 0 deletions test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

int main()
{
return 0;
}

0 comments on commit 7383b0e

Please sign in to comment.