more const

This commit is contained in:
Gustav Louw 2018-04-02 15:58:25 -07:00
parent 72dd9ed70a
commit 2617d72ec5

4
Tinn.c
View File

@ -154,7 +154,7 @@ Tinn xtbuild(int nips, int nhid, int nops)
void xtsave(const Tinn t, const char* path) void xtsave(const Tinn t, const char* path)
{ {
FILE* file = efopen(path, "w"); FILE* const file = efopen(path, "w");
// Header. // Header.
fprintf(file, "%d %d %d\n", t.nips, t.nhid, t.nops); fprintf(file, "%d %d %d\n", t.nips, t.nhid, t.nops);
// Biases and weights. // Biases and weights.
@ -165,7 +165,7 @@ void xtsave(const Tinn t, const char* path)
Tinn xtload(const char* path) Tinn xtload(const char* path)
{ {
FILE* file = efopen(path, "r"); FILE* const file = efopen(path, "r");
int nips = 0; int nips = 0;
int nhid = 0; int nhid = 0;
int nops = 0; int nops = 0;