Commit 774fa494 authored by Friedemann Kleint's avatar Friedemann Kleint

Fix more krazy warnings.

parent cca52b6d
...@@ -165,10 +165,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item) ...@@ -165,10 +165,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
if (gfxObject) { if (gfxObject) {
className = gfxObject->metaObject()->className(); className = gfxObject->metaObject()->className();
className.replace(QRegExp("_QMLTYPE_\\d+"), ""); className.remove(QRegExp("_QMLTYPE_\\d+"));
className.replace(QRegExp("_QML_\\d+"), ""); className.remove(QRegExp("_QML_\\d+"));
if (className.startsWith(QLatin1String("QDeclarative"))) if (className.startsWith(QLatin1String("QDeclarative")))
className = className.replace(QLatin1String("QDeclarative"), ""); className = className.remove(QLatin1String("QDeclarative"));
QDeclarativeItem *declarativeItem = qobject_cast<QDeclarativeItem*>(gfxObject); QDeclarativeItem *declarativeItem = qobject_cast<QDeclarativeItem*>(gfxObject);
if (declarativeItem) { if (declarativeItem) {
...@@ -176,10 +176,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item) ...@@ -176,10 +176,10 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
} }
if (!objectStringId.isEmpty()) { if (!objectStringId.isEmpty()) {
constructedName = objectStringId + " (" + className + ")"; constructedName = objectStringId + " (" + className + QLatin1Char(')');
} else { } else {
if (!gfxObject->objectName().isEmpty()) { if (!gfxObject->objectName().isEmpty()) {
constructedName = gfxObject->objectName() + " (" + className + ")"; constructedName = gfxObject->objectName() + " (" + className + QLatin1Char(')');
} else { } else {
constructedName = className; constructedName = className;
} }
......
...@@ -105,7 +105,7 @@ void LiveSelectionIndicator::setItems(const QList<QWeakPointer<QGraphicsObject> ...@@ -105,7 +105,7 @@ void LiveSelectionIndicator::setItems(const QList<QWeakPointer<QGraphicsObject>
// set selections to also all children if they are not editor items // set selections to also all children if they are not editor items
foreach (QWeakPointer<QGraphicsObject> object, itemList) { foreach (const QWeakPointer<QGraphicsObject> &object, itemList) {
if (object.isNull()) if (object.isNull())
continue; continue;
......
...@@ -382,7 +382,7 @@ void LiveSelectionTool::clear() ...@@ -382,7 +382,7 @@ void LiveSelectionTool::clear()
void LiveSelectionTool::selectedItemsChanged(const QList<QGraphicsItem*> &itemList) void LiveSelectionTool::selectedItemsChanged(const QList<QGraphicsItem*> &itemList)
{ {
foreach (QWeakPointer<QGraphicsObject> obj, m_selectedItemList) { foreach (const QWeakPointer<QGraphicsObject> &obj, m_selectedItemList) {
if (!obj.isNull()) { if (!obj.isNull()) {
disconnect(obj.data(), SIGNAL(xChanged()), this, SLOT(repaintBoundingRects())); disconnect(obj.data(), SIGNAL(xChanged()), this, SLOT(repaintBoundingRects()));
disconnect(obj.data(), SIGNAL(yChanged()), this, SLOT(repaintBoundingRects())); disconnect(obj.data(), SIGNAL(yChanged()), this, SLOT(repaintBoundingRects()));
......
...@@ -407,7 +407,8 @@ void QDeclarativeViewObserverPrivate::_q_createQmlObject(const QString &qml, QOb ...@@ -407,7 +407,8 @@ void QDeclarativeViewObserverPrivate::_q_createQmlObject(const QString &qml, QOb
QString imports; QString imports;
foreach (const QString &s, importList) { foreach (const QString &s, importList) {
imports += s + "\n"; imports += s;
imports += QLatin1Char('\n');
} }
QDeclarativeContext *parentContext = view->engine()->contextForObject(parent); QDeclarativeContext *parentContext = view->engine()->contextForObject(parent);
...@@ -574,7 +575,7 @@ void QDeclarativeViewObserverPrivate::changeTool(Constants::DesignTool tool, ...@@ -574,7 +575,7 @@ void QDeclarativeViewObserverPrivate::changeTool(Constants::DesignTool tool,
void QDeclarativeViewObserverPrivate::setSelectedItemsForTools(QList<QGraphicsItem *> items) void QDeclarativeViewObserverPrivate::setSelectedItemsForTools(QList<QGraphicsItem *> items)
{ {
foreach (QWeakPointer<QGraphicsObject> obj, currentSelection) { foreach (const QWeakPointer<QGraphicsObject> &obj, currentSelection) {
if (QGraphicsItem *item = obj.data()) { if (QGraphicsItem *item = obj.data()) {
if (!items.contains(item)) { if (!items.contains(item)) {
QObject::disconnect(obj.data(), SIGNAL(destroyed(QObject*)), QObject::disconnect(obj.data(), SIGNAL(destroyed(QObject*)),
...@@ -603,7 +604,7 @@ void QDeclarativeViewObserverPrivate::setSelectedItems(QList<QGraphicsItem *> it ...@@ -603,7 +604,7 @@ void QDeclarativeViewObserverPrivate::setSelectedItems(QList<QGraphicsItem *> it
setSelectedItemsForTools(items); setSelectedItemsForTools(items);
if (oldList != currentSelection) { if (oldList != currentSelection) {
QList<QObject*> objectList; QList<QObject*> objectList;
foreach (QWeakPointer<QGraphicsObject> graphicsObject, currentSelection) { foreach (const QWeakPointer<QGraphicsObject> &graphicsObject, currentSelection) {
if (graphicsObject) if (graphicsObject)
objectList << graphicsObject.data(); objectList << graphicsObject.data();
} }
......
...@@ -477,10 +477,10 @@ static QDeclarativeViewer *createViewer() ...@@ -477,10 +477,10 @@ static QDeclarativeViewer *createViewer()
if (opts.experimentalGestures) if (opts.experimentalGestures)
viewer->enableExperimentalGestures(); viewer->enableExperimentalGestures();
foreach (QString lib, opts.imports) foreach (const QString &lib, opts.imports)
viewer->addLibraryPath(lib); viewer->addLibraryPath(lib);
foreach (QString plugin, opts.plugins) foreach (const QString &plugin, opts.plugins)
viewer->addPluginPath(plugin); viewer->addPluginPath(plugin);
viewer->setNetworkCacheSize(opts.cache); viewer->setNetworkCacheSize(opts.cache);
......
...@@ -217,8 +217,9 @@ void QDeclarativeTester::save() ...@@ -217,8 +217,9 @@ void QDeclarativeTester::save()
if (!fe.hash.isEmpty()) { if (!fe.hash.isEmpty()) {
ts << " hash: \"" << fe.hash.toHex() << "\"\n"; ts << " hash: \"" << fe.hash.toHex() << "\"\n";
} else if (!fe.image.isNull()) { } else if (!fe.image.isNull()) {
QString filename = filenameInfo.baseName() + "." + QString::number(imgCount) + ".png"; QString filename = filenameInfo.baseName() + QLatin1Char('.')
fe.image.save(m_script + "." + QString::number(imgCount) + ".png"); + QString::number(imgCount) + ".png";
fe.image.save(m_script + QLatin1Char('.') + QString::number(imgCount) + ".png");
imgCount++; imgCount++;
ts << " image: \"" << filename << "\"\n"; ts << " image: \"" << filename << "\"\n";
} }
......
...@@ -459,10 +459,10 @@ private: ...@@ -459,10 +459,10 @@ private:
QMutexLocker lock(&mutex); QMutexLocker lock(&mutex);
QList<QNetworkCookie> list = allCookies(); QList<QNetworkCookie> list = allCookies();
QByteArray data; QByteArray data;
foreach (QNetworkCookie cookie, list) { foreach (const QNetworkCookie &cookie, list) {
if (!cookie.isSessionCookie()) { if (!cookie.isSessionCookie()) {
data.append(cookie.toRawForm()); data.append(cookie.toRawForm());
data.append("\n"); data.append('\n');
} }
} }
QSettings settings; QSettings settings;
...@@ -1036,7 +1036,7 @@ void QDeclarativeViewer::chooseRecordingOptions() ...@@ -1036,7 +1036,7 @@ void QDeclarativeViewer::chooseRecordingOptions()
// Rate // Rate
record_rate = recdlg->videoRate(); record_rate = recdlg->videoRate();
// Profile // Profile
record_args = recdlg->arguments().split(" ",QString::SkipEmptyParts); record_args = recdlg->arguments().split(QLatin1Char(' '),QString::SkipEmptyParts);
} }
} }
...@@ -1458,7 +1458,7 @@ void QDeclarativeViewer::setRecording(bool on) ...@@ -1458,7 +1458,7 @@ void QDeclarativeViewer::setRecording(bool on)
} }
progress.setValue(progress.maximum()-1); progress.setValue(progress.maximum()-1);
foreach (QString name, inputs) foreach (const QString &name, inputs)
QFile::remove(name); QFile::remove(name);
frames.clear(); frames.clear();
......
...@@ -73,7 +73,7 @@ QString Macro::toString() const ...@@ -73,7 +73,7 @@ QString Macro::toString() const
if (f._functionLike) { if (f._functionLike) {
text += QLatin1Char('('); text += QLatin1Char('(');
bool first = true; bool first = true;
foreach (const QByteArray formal, _formals) { foreach (const QByteArray &formal, _formals) {
if (! first) if (! first)
text += QLatin1String(", "); text += QLatin1String(", ");
else else
......
...@@ -1168,7 +1168,7 @@ void Preprocessor::processDefine(TokenIterator firstToken, TokenIterator lastTok ...@@ -1168,7 +1168,7 @@ void Preprocessor::processDefine(TokenIterator firstToken, TokenIterator lastTok
if (macro.isFunctionLike()) { if (macro.isFunctionLike()) {
macroId += '('; macroId += '(';
bool fst = true; bool fst = true;
foreach (const QByteArray formal, macro.formals()) { foreach (const QByteArray &formal, macro.formals()) {
if (! fst) if (! fst)
macroId += ", "; macroId += ", ";
fst = false; fst = false;
......
...@@ -50,11 +50,12 @@ static inline QColor properColor(const QString &str) ...@@ -50,11 +50,12 @@ static inline QColor properColor(const QString &str)
return QColor(); return QColor();
int lalpha = 255; int lalpha = 255;
QString lcolorStr = str; QString lcolorStr = str;
if (lcolorStr.at(0) == '#' && lcolorStr.length() == 9) { const QChar hash = QLatin1Char('#');
if (lcolorStr.at(0) == hash && lcolorStr.length() == 9) {
QString alphaStr = lcolorStr; QString alphaStr = lcolorStr;
alphaStr.truncate(3); alphaStr.truncate(3);
lcolorStr.remove(0, 3); lcolorStr.remove(0, 3);
lcolorStr = "#" + lcolorStr; lcolorStr = hash + lcolorStr;
alphaStr.remove(0,1); alphaStr.remove(0,1);
bool v; bool v;
lalpha = alphaStr.toInt(&v, 16); lalpha = alphaStr.toInt(&v, 16);
...@@ -62,7 +63,7 @@ static inline QColor properColor(const QString &str) ...@@ -62,7 +63,7 @@ static inline QColor properColor(const QString &str)
lalpha = 255; lalpha = 255;
} }
QColor lcolor(lcolorStr); QColor lcolor(lcolorStr);
if (lcolorStr.contains('#')) if (lcolorStr.contains(hash))
lcolor.setAlpha(lalpha); lcolor.setAlpha(lalpha);
return lcolor; return lcolor;
} }
......
...@@ -72,11 +72,12 @@ static inline QColor properColor(const QString &str) ...@@ -72,11 +72,12 @@ static inline QColor properColor(const QString &str)
return QColor(); return QColor();
int lalpha = 255; int lalpha = 255;
QString lcolorStr = str; QString lcolorStr = str;
if (lcolorStr.at(0) == '#' && lcolorStr.length() == 9) { const QChar hash = QLatin1Char('#');
if (lcolorStr.at(0) == hash && lcolorStr.length() == 9) {
QString alphaStr = lcolorStr; QString alphaStr = lcolorStr;
alphaStr.truncate(3); alphaStr.truncate(3);
lcolorStr.remove(0, 3); lcolorStr.remove(0, 3);
lcolorStr = "#" + lcolorStr; lcolorStr = hash + lcolorStr;
alphaStr.remove(0,1); alphaStr.remove(0,1);
bool v; bool v;
lalpha = alphaStr.toInt(&v, 16); lalpha = alphaStr.toInt(&v, 16);
...@@ -84,7 +85,7 @@ static inline QColor properColor(const QString &str) ...@@ -84,7 +85,7 @@ static inline QColor properColor(const QString &str)
lalpha = 255; lalpha = 255;
} }
QColor lcolor(lcolorStr); QColor lcolor(lcolorStr);
if (lcolorStr.contains('#')) if (lcolorStr.contains(hash))
lcolor.setAlpha(lalpha); lcolor.setAlpha(lalpha);
return lcolor; return lcolor;
} }
......
...@@ -940,7 +940,7 @@ void CodeFormatter::dump() const ...@@ -940,7 +940,7 @@ void CodeFormatter::dump() const
qDebug() << "Current token index" << m_tokenIndex; qDebug() << "Current token index" << m_tokenIndex;
qDebug() << "Current state:"; qDebug() << "Current state:";
foreach (State s, m_currentState) { foreach (const State &s, m_currentState) {
qDebug() << metaEnum.valueToKey(s.type) << s.savedIndentDepth; qDebug() << metaEnum.valueToKey(s.type) << s.savedIndentDepth;
} }
qDebug() << "Current indent depth:" << m_indentDepth; qDebug() << "Current indent depth:" << m_indentDepth;
......
...@@ -204,7 +204,7 @@ QString LineInfo::trimmedCodeLine(const QString &t) ...@@ -204,7 +204,7 @@ QString LineInfo::trimmedCodeLine(const QString &t)
if (yyLinizerState.leftBraceFollows && !text.isEmpty() && text.at(0).isUpper()) { if (yyLinizerState.leftBraceFollows && !text.isEmpty() && text.at(0).isUpper()) {
int i = index; int i = index;
// skip any preceeding 'identifier.'; these could appear in both cases // skip any preceding 'identifier.'; these could appear in both cases
while (i >= 2) { while (i >= 2) {
const Token &prev = yyLinizerState.tokens.at(i-1); const Token &prev = yyLinizerState.tokens.at(i-1);
const Token &prevPrev = yyLinizerState.tokens.at(i-2); const Token &prevPrev = yyLinizerState.tokens.at(i-2);
......
...@@ -534,7 +534,7 @@ StdMapNode *StdMapNode::buildMap(const SymbolGroupValue &n) ...@@ -534,7 +534,7 @@ StdMapNode *StdMapNode::buildMap(const SymbolGroupValue &n)
static inline void indentStream(std::ostream &os, unsigned indent) static inline void indentStream(std::ostream &os, unsigned indent)
{ {
for (unsigned i = 0; i < indent; i++) for (unsigned i = 0; i < indent; ++i)
os << ' '; os << ' ';
} }
...@@ -923,7 +923,7 @@ static inline SymbolGroupValueVector qMapNodes(const SymbolGroupValue &v, Vector ...@@ -923,7 +923,7 @@ static inline SymbolGroupValueVector qMapNodes(const SymbolGroupValue &v, Vector
SymbolGroupValueVector rc; SymbolGroupValueVector rc;
rc.reserve(count); rc.reserve(count);
SymbolGroupValue n = e["forward"][unsigned(0)]; SymbolGroupValue n = e["forward"][unsigned(0)];
for (VectorIndexType i = 0; i < count && n && n.pointerValue() != ePtr; i++) { for (VectorIndexType i = 0; i < count && n && n.pointerValue() != ePtr; ++i) {
rc.push_back(n); rc.push_back(n);
n = n["forward"][unsigned(0)]; n = n["forward"][unsigned(0)];
} }
...@@ -986,7 +986,7 @@ static inline AbstractSymbolGroupNodePtrVector ...@@ -986,7 +986,7 @@ static inline AbstractSymbolGroupNodePtrVector
rc.reserve(count); rc.reserve(count);
std::string errorMessage; std::string errorMessage;
SymbolGroup *sg = v.node()->symbolGroup(); SymbolGroup *sg = v.node()->symbolGroup();
for (VectorIndexType i = 0; i < count ; i++) { for (VectorIndexType i = 0; i < count ; ++i) {
const ULONG64 nodePtr = childNodes.at(i).pointerValue(); const ULONG64 nodePtr = childNodes.at(i).pointerValue();
if (!nodePtr) if (!nodePtr)
return AbstractSymbolGroupNodePtrVector(); return AbstractSymbolGroupNodePtrVector();
......
...@@ -215,7 +215,7 @@ bool threadList(CIDebugSystemObjects *debugSystemObjects, ...@@ -215,7 +215,7 @@ bool threadList(CIDebugSystemObjects *debugSystemObjects,
} }
// Create entries // Create entries
static WCHAR name[256]; static WCHAR name[256];
for (ULONG i= 0; i < threadCount ; i++) { for (ULONG i= 0; i < threadCount ; ++i) {
const ULONG id = ids[i]; const ULONG id = ids[i];
Thread thread(id, systemIds[i]); Thread thread(id, systemIds[i]);
// Thread name // Thread name
...@@ -296,7 +296,7 @@ Modules getModules(CIDebugSymbols *syms, std::string *errorMessage) ...@@ -296,7 +296,7 @@ Modules getModules(CIDebugSymbols *syms, std::string *errorMessage)
return Modules(); return Modules();
} }
for (ULONG m = 0; m < count; m++) { for (ULONG m = 0; m < count; ++m) {
Module module; Module module;
module.base = parameters[m].Base; module.base = parameters[m].Base;
module.size = parameters[m].Size; module.size = parameters[m].Size;
...@@ -321,7 +321,7 @@ std::string gdbmiModules(CIDebugSymbols *syms, bool humanReadable, std::string * ...@@ -321,7 +321,7 @@ std::string gdbmiModules(CIDebugSymbols *syms, bool humanReadable, std::string *
std::ostringstream str; std::ostringstream str;
str << '[' << std::hex << std::showbase; str << '[' << std::hex << std::showbase;
const Modules::size_type size = modules.size(); const Modules::size_type size = modules.size();
for (Modules::size_type m = 0; m < size; m++) { for (Modules::size_type m = 0; m < size; ++m) {
const Module &module = modules.at(m); const Module &module = modules.at(m);
if (m) if (m)
str << ','; str << ',';
...@@ -465,7 +465,7 @@ Registers getRegisters(CIDebugRegisters *regs, ...@@ -465,7 +465,7 @@ Registers getRegisters(CIDebugRegisters *regs,
// Standard registers // Standard registers
DEBUG_REGISTER_DESCRIPTION description; DEBUG_REGISTER_DESCRIPTION description;
DEBUG_VALUE value; DEBUG_VALUE value;
for (ULONG r = 0; r < registerCount; r++) { for (ULONG r = 0; r < registerCount; ++r) {
hr = regs->GetDescriptionWide(r, buf, bufSize, NULL, &description); hr = regs->GetDescriptionWide(r, buf, bufSize, NULL, &description);
if (FAILED(hr)) { if (FAILED(hr)) {
*errorMessage = msgDebugEngineComFailed("GetDescription", hr); *errorMessage = msgDebugEngineComFailed("GetDescription", hr);
...@@ -488,7 +488,7 @@ Registers getRegisters(CIDebugRegisters *regs, ...@@ -488,7 +488,7 @@ Registers getRegisters(CIDebugRegisters *regs,
} }
// Pseudo // Pseudo
for (ULONG r = 0; r < pseudoRegisterCount; r++) { for (ULONG r = 0; r < pseudoRegisterCount; ++r) {
ULONG type; ULONG type;
hr = regs->GetPseudoDescriptionWide(r, buf, bufSize, NULL, NULL, &type); hr = regs->GetPseudoDescriptionWide(r, buf, bufSize, NULL, NULL, &type);
if (FAILED(hr)) if (FAILED(hr))
...@@ -526,7 +526,7 @@ std::string gdbmiRegisters(CIDebugRegisters *regs, ...@@ -526,7 +526,7 @@ std::string gdbmiRegisters(CIDebugRegisters *regs,
if (humanReadable) if (humanReadable)
str << '\n'; str << '\n';
const Registers::size_type size = registers.size(); const Registers::size_type size = registers.size();
for (Registers::size_type r = 0; r < size; r++) { for (Registers::size_type r = 0; r < size; ++r) {
const Register &reg = registers.at(r); const Register &reg = registers.at(r);
if (r) if (r)
str << ','; str << ',';
...@@ -589,7 +589,7 @@ static StackFrames getStackTrace(CIDebugControl *debugControl, ...@@ -589,7 +589,7 @@ static StackFrames getStackTrace(CIDebugControl *debugControl,
*errorMessage = msgDebugEngineComFailed("GetStackTrace", hr); *errorMessage = msgDebugEngineComFailed("GetStackTrace", hr);
} }
StackFrames rc(frameCount, StackFrame()); StackFrames rc(frameCount, StackFrame());
for (ULONG f = 0; f < frameCount; f++) for (ULONG f = 0; f < frameCount; ++f)
getFrame(debugSymbols, frames[f], &(rc[f])); getFrame(debugSymbols, frames[f], &(rc[f]));
delete [] frames; delete [] frames;
return rc; return rc;
...@@ -608,7 +608,7 @@ std::string gdbmiStack(CIDebugControl *debugControl, ...@@ -608,7 +608,7 @@ std::string gdbmiStack(CIDebugControl *debugControl,
std::ostringstream str; std::ostringstream str;
str << '['; str << '[';
const StackFrames::size_type size = frames.size(); const StackFrames::size_type size = frames.size();
for (StackFrames::size_type i = 0; i < size; i++) { for (StackFrames::size_type i = 0; i < size; ++i) {
if (i) if (i)
str << ','; str << ',';
frames.at(i).formatGDBMI(str, (int)i); frames.at(i).formatGDBMI(str, (int)i);
......
...@@ -95,7 +95,7 @@ void simplify(std::string &s) ...@@ -95,7 +95,7 @@ void simplify(std::string &s)
void replace(std::wstring &s, wchar_t before, wchar_t after) void replace(std::wstring &s, wchar_t before, wchar_t after)
{ {
const std::wstring::size_type size = s.size(); const std::wstring::size_type size = s.size();
for (std::wstring::size_type i = 0; i < size; i++) for (std::wstring::size_type i = 0; i < size; ++i)
if (s.at(i) == before) if (s.at(i) == before)
s[i] = after; s[i] = after;
} }
...@@ -146,14 +146,14 @@ static inline void formatGdbmiChar(std::ostream &str, wchar_t c) ...@@ -146,14 +146,14 @@ static inline void formatGdbmiChar(std::ostream &str, wchar_t c)
void gdbmiStringFormat::format(std::ostream &str) const void gdbmiStringFormat::format(std::ostream &str) const
{ {
const std::string::size_type size = m_s.size(); const std::string::size_type size = m_s.size();
for (std::string::size_type i = 0; i < size; i++) for (std::string::size_type i = 0; i < size; ++i)
formatGdbmiChar(str, wchar_t(m_s.at(i))); formatGdbmiChar(str, wchar_t(m_s.at(i)));
} }
void gdbmiWStringFormat::format(std::ostream &str) const void gdbmiWStringFormat::format(std::ostream &str) const
{ {
const std::wstring::size_type size = m_w.size(); const std::wstring::size_type size = m_w.size();
for (std::wstring::size_type i = 0; i < size; i++) for (std::wstring::size_type i = 0; i < size; ++i)
formatGdbmiChar(str, m_w.at(i)); formatGdbmiChar(str, m_w.at(i));
} }
...@@ -171,7 +171,7 @@ std::string wStringToString(const std::wstring &w) ...@@ -171,7 +171,7 @@ std::string wStringToString(const std::wstring &w)
const std::string::size_type size = w.size(); const std::string::size_type size = w.size();
std::string rc; std::string rc;
rc.reserve(size); rc.reserve(size);
for (std::string::size_type i = 0; i < size; i++) for (std::string::size_type i = 0; i < size; ++i)
rc.push_back(char(w.at(i))); rc.push_back(char(w.at(i)));
return rc; return rc;
} }
...@@ -183,7 +183,7 @@ std::wstring stringToWString(const std::string &w) ...@@ -183,7 +183,7 @@ std::wstring stringToWString(const std::string &w)
const std::wstring::size_type size = w.size(); const std::wstring::size_type size = w.size();
std::wstring rc; std::wstring rc;
rc.reserve(size); rc.reserve(size);
for (std::wstring::size_type i = 0; i < size; i++) for (std::wstring::size_type i = 0; i < size; ++i)
rc.push_back(w.at(i)); rc.push_back(w.at(i));
return rc; return rc;
} }
......
...@@ -278,12 +278,12 @@ static inline InamePathEntrySet expandEntrySet(const std::vector<std::string> &n ...@@ -278,12 +278,12 @@ static inline InamePathEntrySet expandEntrySet(const std::vector<std::string> &n
InamePathEntrySet pathEntries; InamePathEntrySet pathEntries;
const std::string::size_type rootSize = root.size(); const std::string::size_type rootSize = root.size();
const VectorIndexType nodeCount = nodes.size(); const VectorIndexType nodeCount = nodes.size();
for (VectorIndexType i= 0; i < nodeCount; i++) { for (VectorIndexType i= 0; i < nodeCount; ++i) {
const std::string &iname = nodes.at(i); // Silently skip items of another group