Skip to content

Commit d2d017d

Browse files
committed
Avoid template bug on macOS
1 parent 37d672c commit d2d017d

File tree

3 files changed

+25
-27
lines changed

3 files changed

+25
-27
lines changed

core/pythoncdb/py_algorithms.cc

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,28 +71,28 @@ namespace cadabra
7171
.value("error", Algorithm::result_t::l_error)
7272
.export_values();
7373

74-
def_algo<canonicalise>(m, "canonicalise");
75-
def_algo<collect_components>(m, "collect_components");
76-
def_algo<collect_factors>(m, "collect_factors");
77-
def_algo<collect_terms>(m, "collect_terms");
78-
def_algo<combine>(m, "combine");
79-
def_algo<decompose_product>(m, "decompose_product");
80-
def_algo<distribute>(m, "distribute");
81-
def_algo<eliminate_kronecker>(m, "eliminate_kronecker");
82-
def_algo<expand>(m, "expand");
83-
def_algo<expand_delta>(m, "expand_delta");
84-
def_algo<expand_diracbar>(m, "expand_diracbar");
85-
def_algo<expand_power>(m, "expand_power");
86-
def_algo<flatten_sum>(m, "flatten_sum");
87-
def_algo<indexsort>(m, "indexsort");
88-
def_algo<lr_tensor>(m, "lr_tensor");
89-
def_algo<product_rule>(m, "product_rule");
90-
def_algo<reduce_delta>(m, "reduce_delta");
91-
def_algo<sort_product>(m, "sort_product");
92-
def_algo<sort_spinors>(m, "sort_spinors");
93-
def_algo<sort_sum>(m, "sort_sum");
94-
def_algo<tabdimension>(m, "tab_dimension");
95-
def_algo<young_project_product>(m, "young_project_product");
74+
def_algo<canonicalise>(m, "canonicalise", true, false, 0);
75+
def_algo<collect_components>(m, "collect_components", true, false, 0);
76+
def_algo<collect_factors>(m, "collect_factors", true, false, 0);
77+
def_algo<collect_terms>(m, "collect_terms", true, false, 0);
78+
def_algo<combine>(m, "combine", true, false, 0);
79+
def_algo<decompose_product>(m, "decompose_product", true, false, 0);
80+
def_algo<distribute>(m, "distribute", true, false, 0);
81+
def_algo<eliminate_kronecker>(m, "eliminate_kronecker", true, false, 0);
82+
def_algo<expand>(m, "expand", true, false, 0);
83+
def_algo<expand_delta>(m, "expand_delta", true, false, 0);
84+
def_algo<expand_diracbar>(m, "expand_diracbar", true, false, 0);
85+
def_algo<expand_power>(m, "expand_power", true, false, 0);
86+
def_algo<flatten_sum>(m, "flatten_sum", true, false, 0);
87+
def_algo<indexsort>(m, "indexsort", true, false, 0);
88+
def_algo<lr_tensor>(m, "lr_tensor", true, false, 0);
89+
def_algo<product_rule>(m, "product_rule", true, false, 0);
90+
def_algo<reduce_delta>(m, "reduce_delta", true, false, 0);
91+
def_algo<sort_product>(m, "sort_product", true, false, 0);
92+
def_algo<sort_spinors>(m, "sort_spinors", true, false, 0);
93+
def_algo<sort_sum>(m, "sort_sum", true, false, 0);
94+
def_algo<tabdimension>(m, "tab_dimension", true, false, 0);
95+
def_algo<young_project_product>(m, "young_project_product", true, false, 0);
9696
def_algo<complete, Ex>(m, "complete", false, false, 0, py::arg("add"));
9797
def_algo<decompose, Ex>(m, "decompose", false, false, 0, py::arg("basis"));
9898
def_algo<drop_weight, Ex>(m, "drop_weight", false, false, 0, py::arg("condition"));
@@ -120,7 +120,7 @@ namespace cadabra
120120
def_algo<take_match, Ex>(m, "take_match", true, false, 0, py::arg("rules"));
121121
def_algo<replace_match>(m, "replace_match", false, false, 0);
122122
def_algo<zoom, Ex>(m, "zoom", true, false, 0, py::arg("rules"));
123-
def_algo<unzoom>(m, "unzoom");
123+
def_algo<unzoom>(m, "unzoom", true, false, 0);
124124
def_algo<rewrite_indices, Ex, Ex>(m, "rewrite_indices", true, false, 0, py::arg("preferred"), py::arg("converters"));
125125
def_algo_preorder<vary, Ex>(m, "vary", false, false, 0, py::arg("rules"));
126126
def_algo<split_gamma, bool>(m, "split_gamma", true, false, 0, py::arg("on_back"));

core/pythoncdb/py_algorithms.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace cadabra
2525
}
2626

2727
template<class Algo, typename... Args, typename... PyArgs>
28-
void def_algo(pybind11::module& m, const char* name, bool deep = true, bool repeat = false, unsigned int depth = 0, PyArgs... args)
28+
void def_algo(pybind11::module& m, const char* name, bool deep, bool repeat, unsigned int depth, PyArgs... args)
2929
{
3030
m.def(name,
3131
&apply_algo<Algo, Args...>,

frontend/gtkmm/ImageView.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ bool ImageView::on_motion_notify_event(GdkEventMotion *event)
3333
if(sizing) {
3434
auto cw = width_at_press + (event->x - prev_x);
3535
auto ratio = pixbuf->get_width() / ((double)pixbuf->get_height());
36-
set_size_request( width_at_press + (event->x - prev_x),
37-
height_at_press + (event->y - prev_y) );
38-
3936
image.set(pixbuf->scale_simple(cw, cw/ratio, Gdk::INTERP_BILINEAR));
37+
set_size_request( cw, cw/ratio );
4038
}
4139
return true;
4240
}

0 commit comments

Comments
 (0)