Răsfoiți Sursa

* Removed useless code / formatted DefineList

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9494 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..rd 13 ani în urmă
părinte
comite
5730bf67d8
1 a modificat fișierele cu 3 adăugiri și 16 ștergeri
  1. 3 16
      engine/src/core/com/jme3/shader/DefineList.java

+ 3 - 16
engine/src/core/com/jme3/shader/DefineList.java

@@ -58,9 +58,6 @@ public class DefineList implements Savable {
 
         oc.write(keys, "keys", null);
         oc.write(vals, "vals", null);
-
-        // for compatability only with older versions
-        oc.write(compiled, "compiled", null);
     }
 
     public void read(JmeImporter im) throws IOException{
@@ -71,8 +68,6 @@ public class DefineList implements Savable {
         for (int i = 0; i < keys.length; i++){
             defines.put(keys[i], vals[i]);
         }
-
-        compiled = ic.readString("compiled", null);
     }
 
     public void clear() {
@@ -81,17 +76,9 @@ public class DefineList implements Savable {
     }
 
     public String get(String key){
-        // I do not see the point of forcing a rebuild on get()
-        // so I'm commenting it out. -pspeed
-        //compiled = null;
         return defines.get(key);
     }
 
-//    public void set(String key, String val){
-//        compiled = null;
-//        defines.put(key, val);
-//    }
-
     public boolean set(String key, VarType type, Object val){    
         if (val == null){
             defines.remove(key);
@@ -103,14 +90,14 @@ public class DefineList implements Savable {
             case Boolean:
                 if ( ((Boolean) val).booleanValue() ) {
                     // same literal, != should work
-                    if( defines.put(key, "1") != "1" ) {  
+                    if (defines.put(key, "1") != "1") {
                         compiled = null;
                         return true;
-                    }                    
+                    }
                 } else if (defines.containsKey(key)) {
                     defines.remove(key);
                     compiled = null;
-                    return true;            
+                    return true;
                 }
                 
                 break;