No. The idea here is very similar to the common "priming read" concept taught in introductory CS courses. Following such a pattern the code here should be:
newFolderName.Assign(folderName);
bool containsChild = true;
int counter = 2;
while (containsChild) {
// This could be localizable but Toolkit is fine without it, see
// mozilla/toolkit/content/contentAreaUtils.js::uniqueFile()
newFolderName.Assign(folderName);
newFolderName.AppendLiteral("(");
newFolderName.AppendInt(i);
newFolderName.AppendLiteral(")");
//Read new data
rv = ContainsChildNamed(newFolderName, &containsChild);
NS_ENSURE_SUCCESS(rv, rv);
}
No. The idea here is very similar to the common "priming read" concept taught in introductory CS courses. Following such a pattern the code here should be:
newFolderName. Assign( folderName) ;
bool containsChild = true;
int counter = 2;
//Priming Read med(newFolderNa me, &containsChild); SUCCESS( rv, rv);
rv = ContainsChildNa
NS_ENSURE_
while (containsChild) { toolkit/ content/ contentAreaUtil s.js::uniqueFil e() .Assign( folderName) ; .AppendLiteral( "("); .AppendInt( i); .AppendLiteral( ")");
// This could be localizable but Toolkit is fine without it, see
// mozilla/
newFolderName
newFolderName
newFolderName
newFolderName
//Read new data med(newFolderNa me, &containsChild); SUCCESS( rv, rv);
rv = ContainsChildNa
NS_ENSURE_
}