Skip to content

Commit 317684a

Browse files
committed
posix: avoid duplicate coerce
1 parent a09f846 commit 317684a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

+stdlib/posix.m

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
% convert a path to a Posix string path separated with "/" even on Windows.
33
% If Windows path also have escaping "\" this breaks
44

5-
function p = posix(p)
5+
function r = posix(p)
66
arguments
7-
p string
7+
p (1,1) string
88
end
99

10-
p = string(p);
11-
1210
if ispc
13-
p = strrep(p, "\", "/");
11+
r = strrep(p, "\", "/");
1412
end
1513

1614
end

0 commit comments

Comments
 (0)