Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-14 15:04:23 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-14 15:16:11 +0300
commit7ae3aa7b63136ea590004ae2ca765697bf0756bc (patch)
tree5331d4248429cec3c564c19be2e6e9386d2df0cd /intern/cycles/util
parentd2195d9ef24a0c8f9098e4791cf18468ba805dba (diff)
Cleanup: don't unnecessarily use ustring in IES file parsing
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_ies.cpp8
-rw-r--r--intern/cycles/util/util_ies.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/intern/cycles/util/util_ies.cpp b/intern/cycles/util/util_ies.cpp
index 7c24a4ec28c..62d3d42186d 100644
--- a/intern/cycles/util/util_ies.cpp
+++ b/intern/cycles/util/util_ies.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <algorithm>
+
#include "util/util_foreach.h"
#include "util/util_ies.h"
#include "util/util_math.h"
@@ -28,7 +30,7 @@ CCL_NAMESPACE_BEGIN
// issue.
template class GuardedAllocator<char>;
-bool IESFile::load(ustring ies)
+bool IESFile::load(const string &ies)
{
clear();
if (!parse(ies) || !process()) {
@@ -76,7 +78,7 @@ class IESTextParser {
vector<char> text;
char *data;
- IESTextParser(ustring str) : text(str.begin(), str.end())
+ IESTextParser(const string &str) : text(str.begin(), str.end())
{
std::replace(text.begin(), text.end(), ',', ' ');
data = strstr(&text[0], "\nTILT=");
@@ -116,7 +118,7 @@ class IESTextParser {
}
};
-bool IESFile::parse(ustring ies)
+bool IESFile::parse(const string &ies)
{
if (ies.empty()) {
return false;
diff --git a/intern/cycles/util/util_ies.h b/intern/cycles/util/util_ies.h
index ab1b9ea57cf..95473103614 100644
--- a/intern/cycles/util/util_ies.h
+++ b/intern/cycles/util/util_ies.h
@@ -17,7 +17,7 @@
#ifndef __UTIL_IES_H__
#define __UTIL_IES_H__
-#include "util/util_param.h"
+#include "util/util_string.h"
#include "util/util_vector.h"
CCL_NAMESPACE_BEGIN
@@ -32,11 +32,11 @@ class IESFile {
int packed_size();
void pack(float *data);
- bool load(ustring ies);
+ bool load(const string &ies);
void clear();
protected:
- bool parse(ustring ies);
+ bool parse(const string &ies);
bool process();
bool process_type_b();
bool process_type_c();