Skip to content

Commit

Permalink
COMMON: Move the PEResourceID constructors into the .cpp
Browse files Browse the repository at this point in the history
And initialize the member variables in the init list,
as suggested by cppcheck.
  • Loading branch information
DrMcCoy committed Mar 19, 2013
1 parent b7b2c3e commit 10192ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/common/pe_exe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@

namespace Common {

PEResourceID::PEResourceID() : _idType(kIDTypeNull) {
}

PEResourceID::PEResourceID(UString x) : _idType(kIDTypeString), _name(x) {
}

PEResourceID::PEResourceID(uint32 x) : _idType(kIDTypeNumerical), _id(x) {
}

PEResourceID &PEResourceID::operator=(UString string) {
_name = string;
_idType = kIDTypeString;
Expand Down
6 changes: 3 additions & 3 deletions src/common/pe_exe.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class UString;

class PEResourceID {
public:
PEResourceID() { _idType = kIDTypeNull; }
PEResourceID(UString x) { _idType = kIDTypeString; _name = x; }
PEResourceID(uint32 x) { _idType = kIDTypeNumerical; _id = x; }
PEResourceID();
PEResourceID(UString x);
PEResourceID(uint32 x);

PEResourceID &operator=(UString string);
PEResourceID &operator=(uint32 x);
Expand Down

0 comments on commit 10192ed

Please sign in to comment.