From 7fbecf7b26d113b5ea44bb44fe91cd6b94f1dd87 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Mon, 27 Sep 2021 15:58:27 +0200 Subject: [PATCH] Reapply a change from commit 125e591c106 which got lost in a merge Fixes #1330 --- brian2/devices/cpp_standalone/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brian2/devices/cpp_standalone/device.py b/brian2/devices/cpp_standalone/device.py index 9aaeff302..23f6f60b9 100644 --- a/brian2/devices/cpp_standalone/device.py +++ b/brian2/devices/cpp_standalone/device.py @@ -1241,7 +1241,7 @@ def build(self, directory='output', self.write_static_arrays(directory) # Check that all names are globally unique - names = [obj.name for net in self.networks for obj in net.objects] + names = [obj.name for net in self.networks for obj in net.sorted_objects] non_unique_names = [name for name, count in Counter(names).items() if count > 1] if len(non_unique_names):