Skip to content

Commit

Permalink
Bug fixing into collections
Browse files Browse the repository at this point in the history
  • Loading branch information
Silviu Caragea committed Jun 30, 2015
1 parent 71cb4c8 commit 2583cb3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions c_src/nif_collection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,7 @@ bool cass_collection_append_from_nif(ErlNifEnv* env, CassCollection* collection,

CassCollectionType value_type_to_collection_type(CassValueType type)
{
if(type == CASS_VALUE_TYPE_LIST)
return CASS_COLLECTION_TYPE_LIST;
else if(type == CASS_VALUE_TYPE_SET)
return CASS_COLLECTION_TYPE_SET;

return CASS_COLLECTION_TYPE_MAP;
return static_cast<CassCollectionType>(type);
}

bool populate_list_set_collection(ErlNifEnv* env, ERL_NIF_TERM list, CassCollection *collection, const SchemaColumn &type, CassError* error)
Expand All @@ -164,7 +159,7 @@ bool populate_list_set_collection(ErlNifEnv* env, ERL_NIF_TERM list, CassCollect
break;
}

return error;
return true;
}

bool populate_map_collection(ErlNifEnv* env, ERL_NIF_TERM list, CassCollection *collection, const SchemaColumn& type, CassError* error)
Expand Down

0 comments on commit 2583cb3

Please sign in to comment.