Skip to content

Commit

Permalink
Refs #4715. Fix OrientedLattice return to avoid unintended copy.
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Feb 1, 2012
1 parent 0d06db4 commit fda7b05
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void export_Sample()
class_< Sample, boost::noncopyable >("Sample", no_init)
.def("getName", &Sample::getName, return_value_policy<copy_const_reference>(), "Returns the string name of the sample")
.def("getOrientedLattice", (const OrientedLattice & (Sample::*)() const)&Sample::getOrientedLattice,
return_value_policy<copy_const_reference>(), "Get the oriented lattice for this sample")
return_value_policy<reference_existing_object>(), "Get the oriented lattice for this sample")
.def("hasOrientedLattice", &Sample::hasOrientedLattice, "Returns True if this sample has an oriented lattice, false otherwise")
.def("size", &Sample::size, "Return the number of samples contained within this sample")
// Required for ISIS SANS reduction until the full sample geometry is defined on loading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,6 @@ def test_getting_search_paths(self):
self.assertEquals(type(paths), std_vector_str)
self.assert_(len(paths) > 0)

# def test_setting_data_search_paths_via_string(self):
# """Set data search paths via a string
# """
# updated = self._setup_test_areas()
# # Set by a string
# config.set_data_dirs(updated)
# # The test
# self._do_path_test()
# self._clean_up_test_areas()
#
# def test_setting_data_search_paths_via_list(self):
# """Set data search paths via a list
# """
# updated = self._setup_test_areas()
# updated_list = updated.split(';')
# # Set by a list
# mtd.settings.setDataSearchDirs(updated_list)
# # The test
# self._do_path_test()
# self._clean_up_test_areas()
#
def _do_path_test(self):
"""Perform the path test
"""
Expand Down

0 comments on commit fda7b05

Please sign in to comment.