Skip to content

Commit

Permalink
versionInfo class removed, comments fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
pruzko authored and metthal committed Apr 5, 2019
1 parent 7384e4a commit e307cf5
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 97 deletions.
1 change: 0 additions & 1 deletion include/retdec/fileformat/fftypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "retdec/fileformat/types/relocation_table/relocation_table.h"
#include "retdec/fileformat/types/resource_table/resource_table.h"
#include "retdec/fileformat/types/resource_table/resource_tree.h"
#include "retdec/fileformat/types/resource_table/resource_version.h"
#include "retdec/fileformat/types/resource_table/resource_icon.h"
#include "retdec/fileformat/types/resource_table/resource_icon_group.h"
#include "retdec/fileformat/types/rich_header/rich_header.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@

#include "retdec/fileformat/types/resource_table/resource.h"
#include "retdec/fileformat/types/resource_table/resource_icon_group.h"
#include "retdec/fileformat/types/resource_table/resource_version.h"

namespace retdec {
namespace fileformat {


/**
* Table of resources
*/
Expand All @@ -27,7 +25,7 @@ class ResourceTable
private:
using resourcesIterator = std::vector<std::unique_ptr<Resource>>::const_iterator;
std::vector<std::unique_ptr<Resource>> table; ///< stored resources
std::vector<ResourceVersion *> resourceVersions; ///< icon groups
std::vector<Resource *> resourceVersions; ///< version info resources
std::vector<ResourceIconGroup *> iconGroups; ///< icon groups
std::vector<ResourceIcon *> icons; ///< icons
std::vector<std::pair<std::string, std::string>> languages; ///< supported languages, LCID and code page
Expand Down Expand Up @@ -82,7 +80,7 @@ class ResourceTable
void parseVersionInfoResources();
void clear();
void addResource(std::unique_ptr<Resource>&& newResource);
void addResourceVersion(ResourceVersion *ver);
void addResourceVersion(Resource *ver);
void addResourceIcon(ResourceIcon *icon);
void addResourceIconGroup(ResourceIconGroup *iGroup);
void linkResourceIconGroups();
Expand Down
57 changes: 0 additions & 57 deletions include/retdec/fileformat/types/resource_table/resource_version.h

This file was deleted.

1 change: 0 additions & 1 deletion src/fileformat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ set(FILEFORMAT_SOURCES
types/resource_table/resource_icon_group.cpp
types/resource_table/resource_table.cpp
types/resource_table/resource_tree.cpp
types/resource_table/resource_version.cpp
types/resource_table/bitmap_image.cpp
types/certificate_table/certificate.cpp
types/certificate_table/certificate_table.cpp
Expand Down
4 changes: 2 additions & 2 deletions src/fileformat/file_format/pe/pe_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1515,8 +1515,8 @@ void PeFormat::loadResources()
}
else if (type == "Version")
{
resource = std::make_unique<ResourceVersion>();
resourceTable->addResourceVersion(static_cast<ResourceVersion *>(resource.get()));
resource = std::make_unique<Resource>();
resourceTable->addResourceVersion(resource.get());
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/fileformat/types/resource_table/resource_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ void ResourceTable::addResource(std::unique_ptr<Resource>&& newResource)
* Add version resource
* @param ver Version resource which will be added
*/
void ResourceTable::addResourceVersion(ResourceVersion *ver)
void ResourceTable::addResourceVersion(Resource *ver)
{
resourceVersions.push_back(ver);
}
Expand Down
31 changes: 0 additions & 31 deletions src/fileformat/types/resource_table/resource_version.cpp

This file was deleted.

0 comments on commit e307cf5

Please sign in to comment.