Browse Source

* Patch from Luiz Americo (bug ID 017238) Small speed improvement, corrected order of arguments

git-svn-id: trunk@15879 -
michael 15 years ago
parent
commit
7a55db3397
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/fcl-json/src/fpjson.pp

+ 2 - 2
packages/fcl-json/src/fpjson.pp

@@ -1300,7 +1300,7 @@ begin
   Flist:=TFPObjectList.Create(True);
   Flist:=TFPObjectList.Create(True);
 end;
 end;
 
 
-Function VarRecToJSON(Const Element : TVarRec; SourceType : String) : TJSONData;
+Function VarRecToJSON(Const Element : TVarRec; const SourceType : String) : TJSONData;
 
 
 begin
 begin
   Result:=Nil;
   Result:=Nil;
@@ -1322,7 +1322,7 @@ begin
       vtObject     : if (VObject is TJSONData) then
       vtObject     : if (VObject is TJSONData) then
                        Result:=TJSONData(VObject)
                        Result:=TJSONData(VObject)
                      else
                      else
-                       Raise EJSON.CreateFmt(SErrNotJSONData,[SourceType,VObject.ClassName]);
+                       Raise EJSON.CreateFmt(SErrNotJSONData,[VObject.ClassName,SourceType]);
       //vtVariant    :
       //vtVariant    :
     else
     else
       Raise EJSON.CreateFmt(SErrUnknownTypeInConstructor,[SourceType,VType])
       Raise EJSON.CreateFmt(SErrUnknownTypeInConstructor,[SourceType,VType])