diff options
author | Rod Smith <rodsmith@rodsbooks.com> | 2022-04-10 09:28:08 -0400 |
---|---|---|
committer | Rod Smith <rodsmith@rodsbooks.com> | 2022-04-10 09:28:08 -0400 |
commit | edc67b66dbd09bf9a905bb5f1eddd1c19c2df294 (patch) | |
tree | 0676771891810a7e386d48e62b81470f80fe1c80 /attributes.h | |
parent | fd60f743628e16180daf3b1719974fa4dadf8f90 (diff) | |
download | sgdisk-edc67b66dbd09bf9a905bb5f1eddd1c19c2df294.tar.gz |
Patch set from Bin Meng to clean up some code & support building sgdisk for Windows
Diffstat (limited to 'attributes.h')
-rw-r--r-- | attributes.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/attributes.h b/attributes.h index 6a61b8c..5eb57e3 100644 --- a/attributes.h +++ b/attributes.h @@ -10,11 +10,9 @@ #define NUM_ATR 64 /* # of attributes -- 64, since it's a 64-bit field */ #define ATR_NAME_SIZE 25 /* maximum size of attribute names */ -using namespace std; - class Attributes { protected: - static string atNames[NUM_ATR]; + static std::string atNames[NUM_ATR]; static int numAttrs; void Setup(void); uint64_t attributes; @@ -30,12 +28,12 @@ public: void ShowAttributes(const uint32_t partNum); void ChangeAttributes(void); - bool OperateOnAttributes(const uint32_t partNum, const string& attributeOperator, const string& attributeBits); + bool OperateOnAttributes(const uint32_t partNum, const std::string& attributeOperator, const std::string& attributeBits); - static const string& GetAttributeName(const uint32_t bitNum) {return atNames [bitNum];} + static const std::string& GetAttributeName(const uint32_t bitNum) {return atNames [bitNum];} static void ListAttributes(void); }; // class Attributes -ostream & operator<<(ostream & os, const Attributes & data); +std::ostream & operator<<(std::ostream & os, const Attributes & data); #endif |