Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
136f205f
Commit
136f205f
authored
Jun 27, 2013
by
hbristow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added handling of constants equaling constants for C++ map
parent
6b88a21b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
gen_matlab.py
modules/matlab/generator/gen_matlab.py
+0
-1
template_map_base.cpp
modules/matlab/generator/templates/template_map_base.cpp
+4
-0
No files found.
modules/matlab/generator/gen_matlab.py
View file @
136f205f
...
...
@@ -33,7 +33,6 @@ class MatlabWrapperGenerator(object):
jtemplate
.
filters
[
'void'
]
=
void
jtemplate
.
filters
[
'not'
]
=
flip
# load the templates
tfunction
=
jtemplate
.
get_template
(
'template_function_base.cpp'
)
tclassm
=
jtemplate
.
get_template
(
'template_class_base.m'
)
...
...
modules/matlab/generator/templates/template_map_base.cpp
View file @
136f205f
...
...
@@ -22,6 +22,10 @@ typedef std::unordered_map Map;
*/
Map
<
std
::
string
,
int
>
constants
=
{
{
%
for
key
,
val
in
constants
.
items
()
%
}
{
%
if
val
|
convertibleToInt
%
}
{
"{{key}}"
,
{{
val
}}
},
{
%
else
%
}
{
"{{key}}"
,
{{
constants
[
val
]}}
},
{
%
endif
%
}
{
%
endfor
%
}
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment