Cosmetic: remove trailing spaces.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1008 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
jfbastien 2009-03-13 12:07:15 +00:00
parent a251ebcc12
commit a2e99a55dd
4 changed files with 117 additions and 117 deletions

View file

@ -32,7 +32,7 @@ class StoragePolicy
typedef @ const_iterator;
typedef A allocator_type;
typedef @ size_type;
StoragePolicy(const StoragePolicy& s);
StoragePolicy(const A&);
StoragePolicy(const E* s, size_type len, const A&);
@ -43,7 +43,7 @@ class StoragePolicy
const_iterator begin() const;
iterator end();
const_iterator end() const;
size_type size() const;
size_type max_size() const;
size_type capacity() const;
@ -51,17 +51,17 @@ class StoragePolicy
void reserve(size_type res_arg);
void append(const E* s, size_type sz);
template <class InputIterator>
void append(InputIterator b, InputIterator e);
void resize(size_type newSize, E fill);
void swap(StoragePolicy& rhs);
const E* c_str() const;
const E* data() const;
A get_allocator() const;
};
////////////////////////////////////////////////////////////////////////////////
@ -94,7 +94,7 @@ public:
typedef typename Storage::allocator_type allocator_type;
typedef typename allocator_type::size_type size_type;
typedef typename Storage::reference reference;
private:
union
{
@ -112,14 +112,14 @@ private:
assert(*d.begin() > 0);
return *d.begin();
}
RefCountType& Refs()
{
Storage& d = Data();
assert(d.size() > 0);
return reinterpret_cast<RefCountType&>(*d.begin());
}
void MakeUnique() const
{
assert(GetRefs() >= 1);
@ -134,7 +134,7 @@ private:
--(*Data().begin()); // Harmut Kaiser fix:
// decrement the use count of the remaining object
new(buf_) Storage(
*new(temp.buf_) Storage(Data()),
*new(temp.buf_) Storage(Data()),
flex_string_details::Shallow());
*Data().begin() = 1;
}
@ -155,12 +155,12 @@ public:
}
assert(Data().size() > 0);
}
CowStringOpt(const allocator_type& a)
{
new(buf_) Storage(1, 1, a);
}
CowStringOpt(const E* s, size_type len, const allocator_type& a)
{
// Warning - MSVC's debugger has trouble tracing through the code below.
@ -177,7 +177,7 @@ public:
new(buf_) Storage(len + 1, c, a);
Refs() = 1;
}
CowStringOpt& operator=(const CowStringOpt& rhs)
{
CowStringOpt(rhs).swap(*this);
@ -194,26 +194,26 @@ public:
{
assert(Data().size() > 0);
MakeUnique();
return Data().begin() + 1;
return Data().begin() + 1;
}
const_iterator begin() const
{
assert(Data().size() > 0);
return Data().begin() + 1;
return Data().begin() + 1;
}
iterator end()
{
MakeUnique();
return Data().end();
return Data().end();
}
const_iterator end() const
{
return Data().end();
return Data().end();
}
size_type size() const
{
assert(Data().size() > 0);
@ -221,13 +221,13 @@ public:
}
size_type max_size() const
{
{
assert(Data().max_size() > 0);
return Data().max_size() - 1;
}
size_type capacity() const
{
{
assert(Data().capacity() > 0);
return Data().capacity() - 1;
}
@ -245,33 +245,33 @@ public:
MakeUnique();
Data().append(b, e);
}
void reserve(size_type res_arg)
{
if (capacity() > res_arg) return;
MakeUnique();
Data().reserve(res_arg + 1);
}
void swap(CowStringOpt& rhs)
{
Data().swap(rhs.Data());
}
const E* c_str() const
{
{
assert(Data().size() > 0);
return Data().c_str() + 1;
}
const E* data() const
{
{
assert(Data().size() > 0);
return Data().data() + 1;
}
allocator_type get_allocator() const
{
{
return Data().get_allocator();
}
};