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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-05-11 17:50:10 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-05-11 17:51:14 +0300
commit92774ff792a6c474df2a40c13204da4975de0c09 (patch)
tree3c709f8f3126449bcc2c50ae51f89442d01e34d0 /intern/cycles/util
parentd57f416e47f54241dea0892f3b064afbe1b8a899 (diff)
Cycles: Use explicit qualifier for single-argument constructors
Almost in all cases we want such constructors to be explicit, there are exceptions but only in few places.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/util_debug.h4
-rw-r--r--intern/cycles/util/util_path.cpp6
-rw-r--r--intern/cycles/util/util_task.h2
-rw-r--r--intern/cycles/util/util_time.h2
-rw-r--r--intern/cycles/util/util_vector.h2
5 files changed, 8 insertions, 8 deletions
diff --git a/intern/cycles/util/util_debug.h b/intern/cycles/util/util_debug.h
index 641abcc0668..1787ff648ee 100644
--- a/intern/cycles/util/util_debug.h
+++ b/intern/cycles/util/util_debug.h
@@ -130,11 +130,11 @@ private:
#if (__cplusplus > 199711L)
public:
- DebugFlags(DebugFlags const& /*other*/) = delete;
+ explicit DebugFlags(DebugFlags const& /*other*/) = delete;
void operator=(DebugFlags const& /*other*/) = delete;
#else
private:
- DebugFlags(DebugFlags const& /*other*/);
+ explicit DebugFlags(DebugFlags const& /*other*/);
void operator=(DebugFlags const& /*other*/);
#endif
};
diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp
index 83754728dbe..0c848beaafd 100644
--- a/intern/cycles/util/util_path.cpp
+++ b/intern/cycles/util/util_path.cpp
@@ -92,7 +92,7 @@ public:
{
}
- directory_iterator(const string& path)
+ explicit directory_iterator(const string& path)
: path_(path),
path_info_(path, find_data_)
{
@@ -176,7 +176,7 @@ class directory_iterator {
public:
class path_info {
public:
- path_info(const string& path)
+ explicit path_info(const string& path)
: path_(path),
entry_(NULL)
{
@@ -203,7 +203,7 @@ public:
{
}
- directory_iterator(const string& path)
+ explicit directory_iterator(const string& path)
: path_(path),
path_info_(path_),
cur_entry_(0)
diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h
index d697ebf35a4..0b82f14f66f 100644
--- a/intern/cycles/util/util_task.h
+++ b/intern/cycles/util/util_task.h
@@ -52,7 +52,7 @@ class Task
{
public:
Task() {};
- Task(const TaskRunFunction& run_) : run(run_) {}
+ explicit Task(const TaskRunFunction& run_) : run(run_) {}
virtual ~Task() {}
diff --git a/intern/cycles/util/util_time.h b/intern/cycles/util/util_time.h
index 9cd52d5f11a..a5b074bffa0 100644
--- a/intern/cycles/util/util_time.h
+++ b/intern/cycles/util/util_time.h
@@ -29,7 +29,7 @@ void time_sleep(double t);
class scoped_timer {
public:
- scoped_timer(double *value) : value_(value)
+ explicit scoped_timer(double *value) : value_(value)
{
time_start_ = time_dt();
}
diff --git a/intern/cycles/util/util_vector.h b/intern/cycles/util/util_vector.h
index ad579da2d2e..b5ee7f98a15 100644
--- a/intern/cycles/util/util_vector.h
+++ b/intern/cycles/util/util_vector.h
@@ -98,7 +98,7 @@ public:
capacity_(0)
{}
- array(size_t newsize)
+ explicit array(size_t newsize)
{
if(newsize == 0) {
data_ = NULL;