Code drop from //branches/cupcake/...@124589

This commit is contained in:
The Android Open Source Project
2008-12-17 18:05:43 -08:00
parent e70cfafe58
commit f013e1afd1
2174 changed files with 1467257 additions and 57598 deletions

View File

@@ -111,6 +111,19 @@ public:
return mArray[idx];
}
//
// Set entry N to specified string.
// [should use operator[] here]
//
void setEntry(int idx, const char* str) {
if (idx < 0 || idx >= mCurrent)
return;
delete[] mArray[idx];
int len = strlen(str);
mArray[idx] = new char[len+1];
memcpy(mArray[idx], str, len+1);
}
private:
int mMax;
int mCurrent;