Code style fixes

This commit is contained in:
Alex Szpakowski
2013-10-20 04:02:09 -03:00
parent 5542ab7f4e
commit 3e9fcacf07
4 changed files with 82 additions and 78 deletions
+28 -27
View File
@@ -39,8 +39,9 @@ namespace love
{ {
namespace luasocket namespace luasocket
{ {
int __open(lua_State * L)
{ int __open(lua_State * L)
{
// Preload code from LuaSocket. // Preload code from LuaSocket.
PRELOAD("socket.core", luaopen_socket_core); PRELOAD("socket.core", luaopen_socket_core);
@@ -58,63 +59,63 @@ namespace luasocket
// No need to register garbage collector function. // No need to register garbage collector function.
return 0; return 0;
} }
int __open_luasocket_socket(lua_State * L) int __open_luasocket_socket(lua_State * L)
{ {
#include "libluasocket/socket.lua.h" #include "libluasocket/socket.lua.h"
lua_getglobal(L, "socket"); lua_getglobal(L, "socket");
return 1; return 1;
} }
int __open_luasocket_ftp(lua_State * L) int __open_luasocket_ftp(lua_State * L)
{ {
#include "libluasocket/ftp.lua.h" #include "libluasocket/ftp.lua.h"
lua_getglobal(L, "socket.ftp"); lua_getglobal(L, "socket.ftp");
return 1; return 1;
} }
int __open_luasocket_http(lua_State * L) int __open_luasocket_http(lua_State * L)
{ {
#include "libluasocket/http.lua.h" #include "libluasocket/http.lua.h"
lua_getglobal(L, "socket.http"); lua_getglobal(L, "socket.http");
return 1; return 1;
} }
int __open_luasocket_ltn12(lua_State * L) int __open_luasocket_ltn12(lua_State * L)
{ {
#include "libluasocket/ltn12.lua.h" #include "libluasocket/ltn12.lua.h"
lua_getglobal(L, "ltn12"); lua_getglobal(L, "ltn12");
return 1; return 1;
} }
int __open_luasocket_mime(lua_State * L) int __open_luasocket_mime(lua_State * L)
{ {
#include "libluasocket/mime.lua.h" #include "libluasocket/mime.lua.h"
lua_getglobal(L, "mime"); lua_getglobal(L, "mime");
return 1; return 1;
} }
int __open_luasocket_smtp(lua_State * L) int __open_luasocket_smtp(lua_State * L)
{ {
#include "libluasocket/smtp.lua.h" #include "libluasocket/smtp.lua.h"
lua_getglobal(L, "socket.smtp"); lua_getglobal(L, "socket.smtp");
return 1; return 1;
} }
int __open_luasocket_tp(lua_State * L) int __open_luasocket_tp(lua_State * L)
{ {
#include "libluasocket/tp.lua.h" #include "libluasocket/tp.lua.h"
lua_getglobal(L, "socket.tp"); lua_getglobal(L, "socket.tp");
return 1; return 1;
} }
int __open_luasocket_url(lua_State * L) int __open_luasocket_url(lua_State * L)
{ {
#include "libluasocket/url.lua.h" #include "libluasocket/url.lua.h"
lua_getglobal(L, "socket.url"); lua_getglobal(L, "socket.url");
return 1; return 1;
} }
} // luasocket } // luasocket
} // love } // love
+13 -12
View File
@@ -28,19 +28,20 @@ namespace love
{ {
namespace luasocket namespace luasocket
{ {
int __open(lua_State * L);
// Loaders for all lua files. We want to be able int __open(lua_State * L);
// to load these dynamically. (Identical in the LuaSocket
// documentation. These functions wrap the parsing of code, etc). // Loaders for all lua files. We want to be able
int __open_luasocket_socket(lua_State * L); // to load these dynamically. (Identical in the LuaSocket
int __open_luasocket_ftp(lua_State * L); // documentation. These functions wrap the parsing of code, etc).
int __open_luasocket_http(lua_State * L); int __open_luasocket_socket(lua_State * L);
int __open_luasocket_ltn12(lua_State * L); int __open_luasocket_ftp(lua_State * L);
int __open_luasocket_mime(lua_State * L); int __open_luasocket_http(lua_State * L);
int __open_luasocket_smtp(lua_State * L); int __open_luasocket_ltn12(lua_State * L);
int __open_luasocket_tp(lua_State * L); int __open_luasocket_mime(lua_State * L);
int __open_luasocket_url(lua_State * L); int __open_luasocket_smtp(lua_State * L);
int __open_luasocket_tp(lua_State * L);
int __open_luasocket_url(lua_State * L);
} // luasocket } // luasocket
} // love } // love
+2 -1
View File
@@ -27,7 +27,8 @@ namespace audio
namespace null namespace null
{ {
Audio::Audio() : distanceModel(DISTANCE_NONE) Audio::Audio()
: distanceModel(DISTANCE_NONE)
{ {
} }
+2 -1
View File
@@ -68,7 +68,8 @@ void Audio::PoolThread::setFinish()
finish = true; finish = true;
} }
Audio::Audio() : distanceModel(DISTANCE_INVERSE_CLAMPED) Audio::Audio()
: distanceModel(DISTANCE_INVERSE_CLAMPED)
{ {
// Passing zero for default device. // Passing zero for default device.
device = alcOpenDevice(0); device = alcOpenDevice(0);