aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/builtin.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-27 19:38:15 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-27 19:38:15 -0800
commit10f3ea0008a4563c2baa4f29954c285d2d53d7dc (patch)
tree8aedadea55a31de188be16a1ec140cdbc76adba5 /src/builtin.cpp
parent88a785e32117081b91b813ac6b5437deb33ef0f7 (diff)
Mark a bunch of constructors as explicit
This prevents undesired implicit conversions
Diffstat (limited to 'src/builtin.cpp')
-rw-r--r--src/builtin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/builtin.cpp b/src/builtin.cpp
index a4363e4b..b83bb82a 100644
--- a/src/builtin.cpp
+++ b/src/builtin.cpp
@@ -2805,7 +2805,7 @@ static int builtin_read(parser_t &parser, io_streams_t &streams, wchar_t **argv)
wcstring tokens;
tokens.reserve(buff.size());
bool empty = true;
-
+
for (wcstring_range loc = wcstring_tok(buff, ifs); loc.first != wcstring::npos; loc = wcstring_tok(buff, ifs, loc))
{
if (!empty) tokens.push_back(ARRAY_SEP);
@@ -2820,7 +2820,7 @@ static int builtin_read(parser_t &parser, io_streams_t &streams, wchar_t **argv)
while (i<argc)
{
- loc = wcstring_tok(buff, (i+1<argc) ? ifs : L"", loc);
+ loc = wcstring_tok(buff, (i+1<argc) ? ifs : wcstring(), loc);
env_set(argv[i], loc.first == wcstring::npos ? L"" : &buff.c_str()[loc.first], place);
++i;
@@ -3141,7 +3141,7 @@ static int builtin_cd(parser_t &parser, io_streams_t &streams, wchar_t **argv)
}
else
{
- dir_in = argv[1];
+ dir_in = env_var_t(argv[1]);
}
bool got_cd_path = false;