Parenthesis around call to std::numeric_limits::max to prevent problems when Windows.h is included.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@987 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
jfbastien 2009-03-02 13:08:03 +00:00
parent c93b2e11d1
commit a3c0926e23

View file

@ -131,8 +131,8 @@ private:
Align align_; Align align_;
} temp; } temp;
--(*Data().begin()); // Harmut Kaiser fix: --(*Data().begin()); // Harmut Kaiser fix:
// decrement the use count of the remaining object // decrement the use count of the remaining object
new(buf_) Storage( new(buf_) Storage(
*new(temp.buf_) Storage(Data()), *new(temp.buf_) Storage(Data()),
flex_string_details::Shallow()); flex_string_details::Shallow());
@ -142,7 +142,7 @@ private:
public: public:
CowStringOpt(const CowStringOpt& s) CowStringOpt(const CowStringOpt& s)
{ {
if (s.GetRefs() == std::numeric_limits<RefCountType>::max()) if (s.GetRefs() == (std::numeric_limits<RefCountType>::max)())
{ {
// must make a brand new copy // must make a brand new copy
new(buf_) Storage(s.Data()); // non shallow new(buf_) Storage(s.Data()); // non shallow