mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Use C++03...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116927 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a9cf7b8443
commit
9f608b1919
@ -68,7 +68,12 @@ Path::operator=(StringRef that) {
|
||||
struct ScopedNullTerminator {
|
||||
std::string &str;
|
||||
ScopedNullTerminator(std::string &s) : str(s) { str.push_back(0); }
|
||||
~ScopedNullTerminator() { str.pop_back(); }
|
||||
~ScopedNullTerminator() {
|
||||
// str.pop_back(); But wait, C++03 doesn't have this...
|
||||
assert(!str.empty() && str[str.size() - 1] == 0
|
||||
&& "Null char not present!");
|
||||
str.resize(str.size() - 1);
|
||||
}
|
||||
};
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user