File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -253,11 +253,10 @@ void add_simplex_module(py::module& root) {
253253 " decode" ,
254254 [](SimplexDecoder& self, const py::array_t <bool >& syndrome) {
255255 if ((size_t )syndrome.size () != self.num_detectors ) {
256- std::ostringstream msg;
257- msg << " Syndrome array size (" << syndrome.size ()
258- << " ) does not match the number of detectors in the decoder ("
259- << self.num_detectors << " )." ;
260- throw std::invalid_argument (msg.str ());
256+ std::string msg = " Syndrome array size (" + std::to_string (syndrome.size ()) +
257+ " ) does not match the number of detectors in the decoder (" +
258+ std::to_string (self.num_detectors ) + " )." ;
259+ throw std::invalid_argument (msg);
261260 }
262261
263262 std::vector<uint64_t > detections;
Original file line number Diff line number Diff line change @@ -253,10 +253,11 @@ void add_tesseract_module(py::module& root) {
253253 msg << " Syndrome array size (" << syndrome.size ()
254254 << " ) does not match the number of detectors in the decoder ("
255255 << self.num_detectors << " )." ;
256- std::string msg = " Syndrome array size (" + std:to_string (syndrome.size ())
257- + " ) does not match the number of detectors in the decoder ("
258- + std::to_string (self.num_detectors ) + " )."
259- throw std::invalid_argument (msg);
256+ std::string msg = " Syndrome array size (" +
257+ std
258+ : to_string (syndrome.size ()) +
259+ " ) does not match the number of detectors in the decoder (" +
260+ std::to_string (self.num_detectors ) + " )." throw std::invalid_argument (msg);
260261 }
261262
262263 std::vector<uint64_t > detections;
You can’t perform that action at this time.
0 commit comments