-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: move default config to class #617
base: main
Are you sure you want to change the base?
Conversation
there should be a config rewrite tbh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
override the fields instead of making a constructor in kotlin please
I did it like how it is because it didn't work properly otherwise. Is this tested? |
private var portIn: Int = 39540 | ||
private var portOut: Int = 39539 | ||
|
||
var anchorHip = true | ||
|
||
var vrmJson: String? = null | ||
|
||
override fun getPortIn(): Int { | ||
return portIn | ||
} | ||
|
||
override fun setPortIn(portIn: Int) { | ||
this.portIn = portIn | ||
} | ||
|
||
override fun getPortOut(): Int { | ||
return portOut | ||
} | ||
|
||
override fun setPortOut(portOut: Int) { | ||
this.portOut = portOut | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't these getters and setters just be override properties?
https://kotlinlang.org/docs/inheritance.html#overriding-properties
private var portIn: Int = 39540 | |
private var portOut: Int = 39539 | |
var anchorHip = true | |
var vrmJson: String? = null | |
override fun getPortIn(): Int { | |
return portIn | |
} | |
override fun setPortIn(portIn: Int) { | |
this.portIn = portIn | |
} | |
override fun getPortOut(): Int { | |
return portOut | |
} | |
override fun setPortOut(portOut: Int) { | |
this.portOut = portOut | |
} | |
override var portIn: Int = 39540 | |
override var portOut: Int = 39539 | |
var anchorHip = true | |
var vrmJson: String? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does VMCConfig overrides all the same from OSCConfig... also just rewrite it all in kotlin without getters and setters.
boop |
@Louka3000 resolve the conversations and conflicts, what's the boop about? |
private var portIn: Int = 39540 | ||
private var portOut: Int = 39539 | ||
|
||
var anchorHip = true | ||
|
||
var vrmJson: String? = null | ||
|
||
override fun getPortIn(): Int { | ||
return portIn | ||
} | ||
|
||
override fun setPortIn(portIn: Int) { | ||
this.portIn = portIn | ||
} | ||
|
||
override fun getPortOut(): Int { | ||
return portOut | ||
} | ||
|
||
override fun setPortOut(portOut: Int) { | ||
this.portOut = portOut | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does VMCConfig overrides all the same from OSCConfig... also just rewrite it all in kotlin without getters and setters.
@@ -7,10 +7,10 @@ public class OSCConfig { | |||
private boolean enabled = false; | |||
|
|||
// Port to receive OSC messages from | |||
private int portIn; | |||
private int portIn = 9002; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class gets extended and the fields get used in children, make it protected or rewrite in kotlin and make public.
The boop is about Butter’s review not being taken care of |
related to #610