sources/mystring.cpp

changeset 191
2e6cbacafdc7
parent 190
90bf9049e5eb
child 195
be953e1621d9
child 196
58d4a48f0904
equal deleted inserted replaced
190:90bf9049e5eb 191:2e6cbacafdc7
135 result = buffer; 135 result = buffer;
136 } 136 }
137 else 137 else
138 { 138 {
139 // vsnprintf needs more space, so we have to allocate a new buffer and try again. 139 // vsnprintf needs more space, so we have to allocate a new buffer and try again.
140 Vector<char> newBuffer(length + 1); 140 std::vector<char> newBuffer(length + 1);
141 vsnprintf(newBuffer.data(), length + 1, formatString, argsCopy); 141 vsnprintf(newBuffer.data(), length + 1, formatString, argsCopy);
142 result = newBuffer.data(); 142 result = newBuffer.data();
143 } 143 }
144 144
145 return result; 145 return result;

mercurial