diff options
author | 2019-11-08 23:52:14 +0100 | |
---|---|---|
committer | 2019-11-08 23:52:14 +0100 | |
commit | 88f702b416ba9eb930e6c1e932124d5f24b1a24c (patch) | |
tree | 955f3047b79156d7b2bbab55fcbd4fbc94661f1d /src/lib/netlist/plib/pstring.h | |
parent | 731c4fe52073a7a7561bf04559e9f0b3b791388d (diff) |
netlist: code maintenance and bug fixes. (nw)
- comment style migration continues.
- Fixed a two bugs in the truthtable ignore inputs code
- refactored the truthtable code a bit for better readability.
- updated netlist specific gitignore.
Diffstat (limited to 'src/lib/netlist/plib/pstring.h')
-rw-r--r-- | src/lib/netlist/plib/pstring.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/lib/netlist/plib/pstring.h b/src/lib/netlist/plib/pstring.h index 25e79f5bdec..5c2ac2b9c47 100644 --- a/src/lib/netlist/plib/pstring.h +++ b/src/lib/netlist/plib/pstring.h @@ -1,12 +1,13 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * pstring.h - */ #ifndef PSTRING_H_ #define PSTRING_H_ +/// +/// \file pstring.h +/// + #include "ptypes.h" #include <exception> @@ -99,7 +100,7 @@ public: { } - /* mingw treats string constants as char* instead of char[N] */ + // mingw treats string constants as char* instead of char[N] #if !defined(_WIN32) && !defined(_WIN64) explicit #endif @@ -207,7 +208,7 @@ public: static constexpr const size_type npos = static_cast<size_type>(-1); - /* the following are extensions to <string> */ + // the following are extensions to <string> // FIXME: remove those size_type mem_t_size() const { return m_str.size(); } @@ -229,7 +230,7 @@ struct pu8_traits static const mem_t *nthcode(const mem_t *p, const std::size_t n) { return &(p[n]); } }; -/* No checking, this may deliver invalid codes */ +// No checking, this may deliver invalid codes struct putf8_traits { using mem_t = char; @@ -269,8 +270,8 @@ struct putf8_traits return 2; else if (c < 0x10000) return 3; - else /* U+10000 U+1FFFFF */ - return 4; /* no checks */ + else // U+10000 U+1FFFFF + return 4; // no checks } static code_t code(const mem_t *p) { @@ -303,7 +304,7 @@ struct putf8_traits s += static_cast<mem_t>(0x80 | ((c>>6) & 0x3f)); s += static_cast<mem_t>(0x80 | (c & 0x3f)); } - else /* U+10000 U+1FFFFF */ + else // U+10000 U+1FFFFF { s += static_cast<mem_t>(0xF0 | (c >> 18)); s += static_cast<mem_t>(0x80 | ((c>>12) & 0x3f)); @@ -348,7 +349,7 @@ struct putf16_traits { if (c < 0x10000) return 1; - else /* U+10000 U+1FFFFF */ + else // U+10000 U+1FFFFF return 2; } static code_t code(const mem_t *p) @@ -512,4 +513,4 @@ namespace std }; } // namespace std -#endif /* PSTRING_H_ */ +#endif // PSTRING_H_ |