| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
| 3  * Copyright (C) 2006-2017 eyeo GmbH | 3  * Copyright (C) 2006-2017 eyeo GmbH | 
| 4  * | 4  * | 
| 5  * Adblock Plus is free software: you can redistribute it and/or modify | 5  * Adblock Plus is free software: you can redistribute it and/or modify | 
| 6  * it under the terms of the GNU General Public License version 3 as | 6  * it under the terms of the GNU General Public License version 3 as | 
| 7  * published by the Free Software Foundation. | 7  * published by the Free Software Foundation. | 
| 8  * | 8  * | 
| 9  * Adblock Plus is distributed in the hope that it will be useful, | 9  * Adblock Plus is distributed in the hope that it will be useful, | 
| 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 324   } | 324   } | 
| 325 | 325 | 
| 326   ~OwnedString() | 326   ~OwnedString() | 
| 327   { | 327   { | 
| 328     if (mBuf) | 328     if (mBuf) | 
| 329       delete[] mBuf; | 329       delete[] mBuf; | 
| 330   } | 330   } | 
| 331 | 331 | 
| 332   OwnedString& operator=(const String& str) | 332   OwnedString& operator=(const String& str) | 
| 333   { | 333   { | 
| 334     *this = std::move(OwnedString(str)); | 334     *this = OwnedString(str); | 
| 335     return *this; | 335     return *this; | 
| 336   } | 336   } | 
| 337 | 337 | 
| 338   OwnedString& operator=(const OwnedString& str) | 338   OwnedString& operator=(const OwnedString& str) | 
| 339   { | 339   { | 
| 340     *this = std::move(OwnedString(str)); | 340     *this = OwnedString(str); | 
| 341     return *this; | 341     return *this; | 
| 342   } | 342   } | 
| 343 | 343 | 
| 344   OwnedString& operator=(OwnedString&& str) | 344   OwnedString& operator=(OwnedString&& str) | 
| 345   { | 345   { | 
| 346     std::swap(mBuf, str.mBuf); | 346     std::swap(mBuf, str.mBuf); | 
| 347     std::swap(mLen, str.mLen); | 347     std::swap(mLen, str.mLen); | 
| 348     return *this; | 348     return *this; | 
| 349   } | 349   } | 
| 350 | 350 | 
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 403     if (negative) | 403     if (negative) | 
| 404       mBuf[pos++] = '-'; | 404       mBuf[pos++] = '-'; | 
| 405 | 405 | 
| 406     for (int i = size - 1; i >= 0; i--) | 406     for (int i = size - 1; i >= 0; i--) | 
| 407     { | 407     { | 
| 408       mBuf[pos + i] = '0' + (num % 10); | 408       mBuf[pos + i] = '0' + (num % 10); | 
| 409       num /= 10; | 409       num /= 10; | 
| 410     } | 410     } | 
| 411   } | 411   } | 
| 412 }; | 412 }; | 
| OLD | NEW | 
|---|