if (persistence_map) {
if (!persist_buf)
persist_buf = new float[bufsize];
- for (size_t i = 0; i != bufsize; i++)
- persist_buf[i] = 1.0;
+ memset(persist_buf, 1.0f, sizeof(float) * bufsize);
}
for (size_t oct = 0; oct < np.octaves; oct++) {
if (persistence_map) {
if (!persist_buf)
persist_buf = new float[bufsize];
- for (size_t i = 0; i != bufsize; i++)
- persist_buf[i] = 1.0;
+
+ memset(persist_buf, 1.0f, sizeof(float) * bufsize);
}
for (size_t oct = 0; oct < np.octaves; oct++) {