Commit a9dcbfe2 authored by Dimitri van Heesch's avatar Dimitri van Heesch
Browse files

Fixed refcounting bug in new string implementation

parent 9323ae47
Loading
Loading
Loading
Loading
+15 −12
Original line number Original line Diff line number Diff line
@@ -497,6 +497,8 @@ public:
          }
          }
        }
        }
        StringRep &operator=(const StringRep &s)
        StringRep &operator=(const StringRep &s)
        {
          if (&s!=this)
          {
          {
            if (!u.s.isShort)
            if (!u.s.isShort)
            {
            {
@@ -512,6 +514,7 @@ public:
              u.l.d = s.u.l.d;
              u.l.d = s.u.l.d;
              u.l.d->refCount++;
              u.l.d->refCount++;
            }
            }
          }
          return *this;
          return *this;
        }
        }
        StringRep &operator=(const char *str)
        StringRep &operator=(const char *str)

qtools/rcstring.h

deleted100644 → 0
+0 −791

File deleted.

Preview size limit exceeded, changes collapsed.