Skip to content

Commit

Permalink
Remove redundant number-to-atom conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
khueue committed Sep 2, 2012
1 parent 4cd98d4 commit bd0b0bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/bson/bson_encoder.pl
Expand Up @@ -151,8 +151,7 @@
add_array_keys(List, 0, Array).

add_array_keys([], _Index, []).
add_array_keys([Value|Values], Index, [Key-Value|Pairs]) :-
core:atom_number(Key, Index),
add_array_keys([Value|Values], Index, [Index-Value|Pairs]) :-
Index1 is Index + 1,
add_array_keys(Values, Index1, Pairs).

Expand Down

0 comments on commit bd0b0bf

Please sign in to comment.