@@ -1768,11 +1768,11 @@ namespace DuiLib {
1768
1768
faw::string_t *pStr = (faw::string_t *) (sLinks + iLinkIndex);
1769
1769
pStr->clear ();
1770
1770
while (!pstrText.empty () && pstrText[0 ] != _T (' >' ) && pstrText[0 ] != _T (' }' )) {
1771
- faw::string_t pstrTemp = pstrText.substr (1 );
1772
- while (pstrText < pstrTemp) {
1771
+ // faw::string_t pstrTemp = pstrText.substr (1);
1772
+ // while (pstrText < pstrTemp) {
1773
1773
*pStr += pstrText[0 ];
1774
1774
pstrText = pstrText.substr (1 );
1775
- }
1775
+ // }
1776
1776
}
1777
1777
}
1778
1778
@@ -1845,21 +1845,21 @@ namespace DuiLib {
1845
1845
bool bUnderline = false ;
1846
1846
bool bItalic = false ;
1847
1847
while (!pstrText.empty () && pstrText[0 ] != _T (' >' ) && pstrText[0 ] != _T (' }' ) && pstrText[0 ] != _T (' ' )) {
1848
- pstrTemp = pstrText.substr (1 );
1849
- while (pstrText < pstrTemp) {
1848
+ // pstrTemp = pstrText.substr (1);
1849
+ // while (pstrText < pstrTemp) {
1850
1850
sFontName += pstrText[0 ];
1851
1851
pstrText = pstrText.substr (1 );
1852
- }
1852
+ // }
1853
1853
}
1854
1854
if (isdigit (pstrText[0 ])) {
1855
1855
iFontSize = FawTools::parse_dec (pstrText);
1856
1856
}
1857
1857
while (!pstrText.empty () && pstrText[0 ] != _T (' >' ) && pstrText[0 ] != _T (' }' )) {
1858
- pstrTemp = pstrText.substr (1 );
1859
- while (pstrText < pstrTemp) {
1858
+ // pstrTemp = pstrText.substr (1);
1859
+ // while (pstrText < pstrTemp) {
1860
1860
sFontAttr += pstrText[0 ];
1861
1861
pstrText = pstrText.substr (1 );
1862
- }
1862
+ // }
1863
1863
}
1864
1864
FawTools::lower (sFontAttr );
1865
1865
if (sFontAttr .find (_T (" bold" )) != faw::string_t ::npos) bBold = true ;
@@ -1885,11 +1885,11 @@ namespace DuiLib {
1885
1885
const TImageInfo* pImageInfo = nullptr ;
1886
1886
faw::string_t sName ;
1887
1887
while (!pstrText.empty () && pstrText[0 ] != _T (' >' ) && pstrText[0 ] != _T (' }' ) && pstrText[0 ] != _T (' ' )) {
1888
- faw::string_t pstrTemp = pstrText.substr (1 );
1889
- while (pstrText < pstrTemp) {
1888
+ // faw::string_t pstrTemp = pstrText.substr (1);
1889
+ // while (pstrText < pstrTemp) {
1890
1890
sName += pstrText[0 ];
1891
1891
pstrText = pstrText.substr (1 );
1892
- }
1892
+ // }
1893
1893
}
1894
1894
if (sName .empty ()) { // Italic
1895
1895
pstrNextStart = _T (" " );
@@ -1920,22 +1920,22 @@ namespace DuiLib {
1920
1920
sItem .clear ();
1921
1921
sValue .clear ();
1922
1922
while (pStrImage[0 ] != _T (' \0 ' ) && pStrImage[0 ] != _T (' =' ) && pStrImage[0 ] > _T (' ' )) {
1923
- faw::string_t pstrTemp = pStrImage.substr (1 );
1924
- while (pStrImage < pstrTemp) {
1923
+ // faw::string_t pstrTemp = pStrImage.substr (1);
1924
+ // while (pStrImage < pstrTemp) {
1925
1925
sItem += pStrImage[0 ];
1926
1926
pStrImage = pStrImage.substr (1 );
1927
- }
1927
+ // }
1928
1928
}
1929
1929
if (pStrImage[0 ] != _T (' =' )) break ;
1930
1930
pStrImage = pStrImage.substr (1 );
1931
1931
if (pStrImage[0 ] != _T (' \' ' )) break ;
1932
1932
pStrImage = pStrImage.substr (1 );
1933
1933
while (pStrImage[0 ] != _T (' \0 ' ) && pStrImage[0 ] != _T (' \' ' )) {
1934
- faw::string_t pstrTemp = pStrImage.substr (1 );
1935
- while (pStrImage < pstrTemp) {
1934
+ // faw::string_t pstrTemp = pStrImage.substr (1);
1935
+ // while (pStrImage < pstrTemp) {
1936
1936
sValue += pStrImage[0 ];
1937
1937
pStrImage = pStrImage.substr (1 );
1938
- }
1938
+ // }
1939
1939
}
1940
1940
if (pStrImage[0 ] != _T (' \' ' )) break ;
1941
1941
pStrImage = pStrImage.substr (1 );
@@ -2166,15 +2166,15 @@ namespace DuiLib {
2166
2166
}
2167
2167
pstrNext = p.substr (1 );
2168
2168
cchChars++;
2169
- cchSize += (int ) (pstrNext. data () - p. data ());
2169
+ cchSize += (int ) (p. size () - pstrNext. size ());
2170
2170
szText.cx = cchChars * pTm->tmMaxCharWidth ;
2171
2171
if (pt.x + szText.cx >= rc.right ) {
2172
2172
::GetTextExtentPoint32 (hDC, pstrText.data (), cchSize, &szText);
2173
2173
}
2174
2174
if (pt.x + szText.cx > rc.right ) {
2175
2175
if (pt.x + szText.cx > rc.right && pt.x != rc.left ) {
2176
2176
cchChars--;
2177
- cchSize -= (int ) (pstrNext. data () - p. data ());
2177
+ cchSize -= (int ) (p. size () - pstrNext. size ());
2178
2178
}
2179
2179
if ((uStyle & DT_WORDBREAK) != 0 && cchLastGoodWord > 0 ) {
2180
2180
cchChars = cchLastGoodWord;
@@ -2186,9 +2186,9 @@ namespace DuiLib {
2186
2186
if (cchChars > 0 ) {
2187
2187
cchChars -= 1 ;
2188
2188
pstrPrev = &pstrPrev.data ()[-1 ];
2189
- cchSize -= (int ) (p.data () - pstrPrev. data ());
2189
+ cchSize -= (int ) (p.size () - pstrNext. size ());
2190
2190
} else
2191
- cchSize -= (int ) (p.data () - pstrPrev. data ());
2191
+ cchSize -= (int ) (p.size () - pstrNext. size ());
2192
2192
pt.x = rc.right ;
2193
2193
}
2194
2194
bLineEnd = true ;
0 commit comments