Skip to content

Commit 6c3bf0a

Browse files
authored
[Chores] Format code
1 parent 366a4dd commit 6c3bf0a

File tree

5 files changed

+5
-15
lines changed

5 files changed

+5
-15
lines changed

src/lua/extra.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
#include "lua-protobuf/pb.h"
2727
#include "lua/luafile.h"
2828
#include "lua/luawrapper.h"
29+
#include "support/djbhash.h"
2930
#include "support/file.h"
3031
#include "support/strings-helpers.h"
31-
#include "support/djbhash.h"
3232
#include "support/zip.h"
3333

3434
namespace {
@@ -82,9 +82,7 @@ PCSX::File* load(std::string_view name, std::string_view from, bool inArchives =
8282
return new PCSX::PosixFile(absolutePath);
8383
}
8484

85-
uint64_t djbHash(const char* str, size_t len) {
86-
return PCSX::djb::hash(str, len);
87-
}
85+
uint64_t djbHash(const char* str, size_t len) { return PCSX::djb::hash(str, len); }
8886

8987
template <typename T, size_t S>
9088
void registerSymbol(PCSX::Lua L, const char (&name)[S], const T ptr) {

src/lua/extra.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
-- along with this program; if not, write to the
1616
-- Free Software Foundation, Inc.,
1717
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18-
1918
ffi.cdef [[
2019
uint64_t djbHash(const char* str, size_t len);
2120
]]
@@ -40,8 +39,6 @@ Support.extra = {
4039
error('FFI call failed in ' .. name .. ': ' .. ret)
4140
end,
4241

43-
djbHash = function(str)
44-
return C.djbHash(str, #str)
45-
end,
42+
djbHash = function(str) return C.djbHash(str, #str) end,
4643
}
4744
-- )EOF"

src/lua/fileffimeta.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ local sliceMeta = {
3232
elseif index == 'size' then
3333
return tonumber(C.getSliceSize(slice._wrapper))
3434
elseif index == 'resize' then
35-
return function(slice, size)
36-
C.resizeSlice(slice._wrapper, size)
37-
end
35+
return function(slice, size) C.resizeSlice(slice._wrapper, size) end
3836
end
3937
error('Unknown index `' .. index .. '` for LuaSlice')
4038
end,

src/mips/psyqo/examples/pcsxlua/pcsxlua.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
-- SOFTWARE.
22-
2322
-- This is the companion Lua script for the PCSX-Redux Lua editor demo.
2423
-- See pcsxlua.cpp for the C++ side of the demo.
2524
local addresses = {}

src/supportpsx/binffi.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ PCSX.Misc.uclPack = function(src, dest)
191191

192192
local outSize = C.uclWrapper(srcPtr, srcSize, destPtr)
193193

194-
if outSize == 0 then
195-
error('Fatal error during data compression.')
196-
end
194+
if outSize == 0 then error('Fatal error during data compression.') end
197195

198196
if type(dest) == 'table' and dest._type == 'File' then
199197
destSlice:resize(outSize)

0 commit comments

Comments
 (0)