Back to the main page.
Bug 1283 - trunk\src\reset mex file overwrites built-in function
Status | CLOSED FIXED |
Reported | 2012-01-25 10:06:00 +0100 |
Modified | 2012-08-23 10:35:12 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P3 minor |
Assigned to: | Eelke Spaak |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Jörn M. Horschig - 2012-01-25 10:06:30 +0100
and that throws annoying warnings... maybe we should rename that file? Warning: Function M:\FieldTrip\trunk\src\reset.mexw32 has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict. > In path at 110 In addpath at 87 In ft_hastoolbox>myaddpath at 376 In ft_hastoolbox at 305 In ft_defaults at 122 In ft_prepare_layout at 82 (FYI: >> help reset RESET Reset graphics object properties to their defaults.)
Boris Reuderink - 2012-02-28 14:11:02 +0100
A quick grep seems to indicate that the function is not used. Can we remove it? If not, perhaps we should rename it to 'setzero' (as that is what the file seems to implement).
Jörn M. Horschig - 2012-02-28 14:13:18 +0100
Is that a question for me or for Robert? In the former case: idk, I think we should ask Robert ;)
Eelke Spaak - 2012-03-14 10:11:10 +0100
It is used in @config/config.m; I will rename it to setzero. $ grep -R --include=*.m reset\( . ./@config/private/reset.m:function [varargout] = reset(varargin) ./@config/private/reset.m:% reset(a); ./@config/config.m: reset(y.assign .(key{i})); % reset the counter to zero ./@config/config.m: reset(y.reference.(key{i})); % reset the counter to zero ./@config/config.m: reset(y.original .(key{i})); % first set to zero and then increment with one,
Eelke Spaak - 2012-03-14 10:26:46 +0100
fixed in revision 5458
Arjen Stolk - 2012-03-14 13:33:51 +0100
move source code for any object-specific functions to within the object directory
Robert Oostenveld - 2012-03-22 09:26:02 +0100
(In reply to comment #5) I moved the source code of the config-object mex files to config/private. It is not used elsewhere. See also http://fieldtrip.fcdonders.nl/code_guidelines?&#compiling_mex_files I also deleted the corresponding mex files in src manzana> svn commit src \@config/private/ Adding @config/private/setzero.c Deleting src/deepcopy.c Deleting src/deepcopy.mexa64 Deleting src/deepcopy.mexglx Deleting src/deepcopy.mexmac Deleting src/deepcopy.mexmaci Deleting src/deepcopy.mexmaci64 Deleting src/deepcopy.mexw32 Deleting src/deepcopy.mexw64 Deleting src/increment.c Deleting src/increment.mexa64 Deleting src/increment.mexglx Deleting src/increment.mexmac Deleting src/increment.mexmaci Deleting src/increment.mexmaci64 Deleting src/increment.mexw32 Deleting src/increment.mexw64 Deleting src/setzero.c Deleting src/setzero.mexa64 Deleting src/setzero.mexglx Deleting src/setzero.mexmac Deleting src/setzero.mexmaci Deleting src/setzero.mexmaci64 Deleting src/setzero.mexw32 Deleting src/setzero.mexw64 Committed revision 5509.
Robert Oostenveld - 2012-03-22 09:27:35 +0100
(In reply to comment #6) Since they are only used in the config object, they don't need to be autosynced. manzana> svn propdel autosync *.c property 'autosync' deleted from 'deepcopy.c'. property 'autosync' deleted from 'increment.c'. property 'autosync' deleted from 'setzero.c'. manzana> svn propdel autosync *.mex* property 'autosync' deleted from 'deepcopy.mexa64'. property 'autosync' deleted from 'deepcopy.mexglx'. property 'autosync' deleted from 'deepcopy.mexmac'. property 'autosync' deleted from 'deepcopy.mexmaci'. property 'autosync' deleted from 'deepcopy.mexmaci64'. property 'autosync' deleted from 'deepcopy.mexw32'. property 'autosync' deleted from 'deepcopy.mexw64'. property 'autosync' deleted from 'increment.mexa64'. property 'autosync' deleted from 'increment.mexglx'. property 'autosync' deleted from 'increment.mexmac'. property 'autosync' deleted from 'increment.mexmaci'. property 'autosync' deleted from 'increment.mexmaci64'. property 'autosync' deleted from 'increment.mexw32'. property 'autosync' deleted from 'increment.mexw64'. property 'autosync' deleted from 'setzero.mexa64'. property 'autosync' deleted from 'setzero.mexglx'. property 'autosync' deleted from 'setzero.mexmac'. property 'autosync' deleted from 'setzero.mexmaci'. property 'autosync' deleted from 'setzero.mexmaci64'. property 'autosync' deleted from 'setzero.mexw32'. property 'autosync' deleted from 'setzero.mexw64'. manzana> svn commit Sending private/deepcopy.c Sending private/deepcopy.mexa64 Sending private/deepcopy.mexglx Sending private/deepcopy.mexmac Sending private/deepcopy.mexmaci Sending private/deepcopy.mexmaci64 Sending private/deepcopy.mexw32 Sending private/deepcopy.mexw64 Sending private/increment.c Sending private/increment.mexa64 Sending private/increment.mexglx Sending private/increment.mexmac Sending private/increment.mexmaci Sending private/increment.mexmaci64 Sending private/increment.mexw32 Sending private/increment.mexw64 Sending private/setzero.c Sending private/setzero.mexa64 Sending private/setzero.mexglx Sending private/setzero.mexmac Sending private/setzero.mexmaci Sending private/setzero.mexmaci64 Sending private/setzero.mexw32 Sending private/setzero.mexw64 Committed revision 5510.