Mercurial > repos > public > sbplib
comparison copyWithDefault.m @ 304:499653b553b8 feature/beams
copyWithDefault: fixed bug.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 12 Sep 2016 14:08:06 +0200 |
parents | 46256fffa329 |
children |
comparison
equal
deleted
inserted
replaced
280:e1a05acc1b5d | 304:499653b553b8 |
---|---|
6 dest = default; | 6 dest = default; |
7 return | 7 return |
8 end | 8 end |
9 | 9 |
10 % src has a value and is not a struct => use src | 10 % src has a value and is not a struct => use src |
11 if ~isstruct(src) | 11 % src has a value and default is not a struct => use src |
12 if ~isstruct(src) || ~isstruct(default) | |
12 dest = src; | 13 dest = src; |
13 return | 14 return |
14 end | 15 end |
15 | 16 |
16 | 17 |