Skip to content

Commit

Permalink
Clean ups.
Browse files Browse the repository at this point in the history
  • Loading branch information
vktr committed Apr 23, 2015
1 parent 7f99669 commit eb0baff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/scripting/modules/filesystemmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,13 @@ duk_ret_t FileSystemModule::getFiles(duk_context* ctx)

std::vector<Poco::File> files;
p.list(files);
std::vector<Poco::File>::iterator it = files.begin();

int arrayIndex = duk_push_array(ctx);
int i = 0;

for (; it != files.end(); ++it)
for (Poco::File file : files)
{
duk_push_string(ctx, it->path().c_str());
duk_push_string(ctx, file.path().c_str());
duk_put_prop_index(ctx, arrayIndex, i);

++i;
Expand Down

0 comments on commit eb0baff

Please sign in to comment.