Permalink
Browse files

Merge branch 'master' into new-html-docs

  • Loading branch information...
LadyCailin committed Nov 10, 2017
2 parents 70d5860 + 583f7ee commit ad6771d3969ff7309e60a018f4691a7eaa737b43
@@ -452,7 +452,7 @@ public static Construct resolveConstruct(String val, Target t) throws ConfigRunt
return CNull.NULL;
}
if (val.equals("void")) {
return CVoid.TYPE;
return CVoid.VOID;
}
if (INVALID_HEX.matcher(val).matches()) {
throw new CREFormatException("Hex numbers must only contain digits 0-9, and the letters A-F, but \"" + val + "\" was found.", t);
@@ -21,24 +21,7 @@
public static final CVoid VOID = new CVoid(Target.UNKNOWN);
/**
* Constructs a new CVoid object. Generally speaking, this should only be used when creating void values that are
* literally created by user code, all internal code should simply use {@link #VOID}. This method DOES check the
* target however, and if the target is {@link Target#UNKNOWN}, {@link CVoid#VOID} is returned anyways.
*
* @param t
* @return
*/
public static CVoid GenerateCVoid(Target t) {
if (t == Target.UNKNOWN) {
return VOID;
} else {
return new CVoid(t);
}
}
/**
* Private constructor to force usage of {@link #GenerateCVoid(com.laytonsmith.core.constructs.Target)}, which can
* return existing objects.
* Private constructor, because there can only be one
*
* @param t
*/
@@ -934,7 +934,7 @@ public CBoolean exec(Target t, Environment environment, Construct... args) throw
if (args.length != 2) {
throw new CREFormatException(this.getName() + " expects 2 arguments.", t);
}
if (args[1].getClass().equals(args[0].getClass())) {
if (args[1].typeof().equals(args[0].typeof())) {
if (args[0] instanceof CString && args[1] instanceof CString) {
// Check for actual string equality, so we don't do type massaging
// for numeric strings. Thus '2' !== '2.0'
Oops, something went wrong.

0 comments on commit ad6771d

Please sign in to comment.