- if (mSorted) {
- for (i=0; i<ENTRIES; i++) {
- entry& ent = const_cast<entry&>(entryAt(i));
- ent.indices.clear();
- ent.indices.add(i);
- *index++ = htodl(ent.offset);
- }
- } else {
- for (i=0; i<ENTRIES; i++) {
- entry& ent = mEntries.editItemAt(mEntryArray[i]);
- *index++ = htodl(ent.offset);
- NOISY(printf("Writing entry #%d: \"%s\" ent=%d off=%d\n", i,
- String8(ent.value).string(),
- mEntryArray[i], ent.offset));
- }
+ for (i=0; i<ENTRIES; i++) {
+ entry& ent = mEntries.editItemAt(mEntryArray[i]);
+ *index++ = htodl(ent.offset);
+ NOISY(printf("Writing entry #%d: \"%s\" ent=%d off=%d\n", i,
+ String8(ent.value).string(),
+ mEntryArray[i], ent.offset));