Skip to content

Commit

Permalink
Removed constructor from src/configtype.nim so you can actually read …
Browse files Browse the repository at this point in the history
…the nimble file without dependencies
  • Loading branch information
Patitotective committed Jan 10, 2024
1 parent ad30c48 commit d1f17c8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ImExample.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ requires "constructor >= 1.2.0"
import std/[strformat, options]
import src/configtype

const config = initConfig()
const config = Config()

version = config.version
namedBin["main"] = config.name
Expand Down
2 changes: 1 addition & 1 deletion main.nim
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ proc initApp(): App =
when defined(release):
result.resources = readResources()

result.config = initConfig()
result.config = Config()

let filename =
when defined(release): "prefs"
Expand Down
2 changes: 1 addition & 1 deletion resources.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import std/[sequtils, tables]
import kdl
import src/configtype

const config = initConfig()
const config = Config()

const resourcesPaths = @[
config.stylePath,
Expand Down
3 changes: 1 addition & 2 deletions src/configtype.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/options
import constructor/defaults

type

Expand All @@ -15,7 +14,7 @@ proc font*(path: string, size: float32, glyphRanges = GlyphRanges.Default): Font
Font(path: path, size: size, glyphRanges: glyphRanges)

type
Config* {.defaults: {defExported}.} = object
Config* = object
name* = "ImExample"
comment* = "ImExample is a simple Dear ImGui application example"
version* = "2.0.0"
Expand Down

0 comments on commit d1f17c8

Please sign in to comment.