Skip to content

Commit

Permalink
fixes + remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
SatyrDiamond committed Oct 25, 2024
1 parent 19413bb commit 38dfac7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dawvert_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def __do_auto_detect(self):
if outshort:
self.ui.ListWidget_InPlugin.setCurrentRow(plugnames.index(outshort))
return outshort != None
elif plugnames:
elif len(plugnames)==1:
dawvert_core.input_set(plugnames[0])
return False
return False
Expand Down
3 changes: 1 addition & 2 deletions functions/data_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ def get_bitnums_int(x):
return [i for i in range(x.bit_length()) if ((1 << i) & x)]

def get_bitnums(x):
x = int.from_bytes(x, 'little')
return [i for i in range(x.bit_length()) if ((1 << i) & x)]
return get_bitnums_int(int.from_bytes(x, 'little'))

def set_bitnums(x, n):
outvals = 0
Expand Down

0 comments on commit 38dfac7

Please sign in to comment.