1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed object initializer warnings

This commit is contained in:
Brian Fiete 2020-08-29 11:56:10 -07:00
parent 10421d99ca
commit f795215b44
13 changed files with 48 additions and 48 deletions

View file

@ -375,12 +375,12 @@ namespace IDE
if (mPtrSize == 4)
{
fromDir = scope:: String(llvmDir, "i686-w64-mingw32/bin/");
mingwFiles = scope:: String[] { "libgcc_s_dw2-1.dll", "libstdc++-6.dll" };
mingwFiles = scope:: String[] ( "libgcc_s_dw2-1.dll", "libstdc++-6.dll" );
}
else
{
fromDir = scope:: String(llvmDir, "x86_64-w64-mingw32/bin/");
mingwFiles = scope:: String[] { "libgcc_s_seh-1.dll", "libstdc++-6.dll", "libwinpthread-1.dll" };
mingwFiles = scope:: String[] ( "libgcc_s_seh-1.dll", "libstdc++-6.dll", "libwinpthread-1.dll" );
}
for (var mingwFile in mingwFiles)
{

View file

@ -27,9 +27,9 @@ namespace IDE
void* mNativeSpellChecker;
String[] mLangWordList = new String[] {
String[] mLangWordList = new String[] (
"int", "uint", "struct", "bool", "enum", "int", "proj", "newbox", "params", "typeof", "var"
} ~ delete _;
) ~ delete _;
public String mLangPath ~ delete _;
public HashSet<String> mIgnoreWordList = new HashSet<String>() ~ DeleteContainerAndItems!(_);

View file

@ -691,7 +691,7 @@ namespace IDE.ui
RehupSize();
});
for (int32 c in scope int32[] { 4, 8, 16, 32, 64 })
for (int32 c in scope int32[] ( 4, 8, 16, 32, 64 ))
{
columnChoice = menuItem.AddItem(StackStringFormat!("{0} bytes", c));
if ((mAutoResizeType == .Manual) && (c == (int32)mBytesPerDisplayLine))

View file

@ -133,15 +133,15 @@ namespace IDE.ui
typeName.Clear(); typeName.Append(optionsName, "mRuntimeChecks");
AddPropertiesItem(category, "Runtime Checks", typeName,
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
typeName.Clear(); typeName.Append(optionsName, "mEmitDynamicCastCheck");
AddPropertiesItem(category, "Dynamic Cast Check", typeName,
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
typeName.Clear(); typeName.Append(optionsName, "mEmitObjectAccessCheck");
AddPropertiesItem(category, "Object Access Check", typeName,
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
typeName.Clear(); typeName.Append(optionsName, "mAllocStackTraceDepth");
AddPropertiesItem(category, "Alloc Stack Trace Depth", typeName);
@ -153,23 +153,23 @@ namespace IDE.ui
typeName.Clear(); typeName.Append(optionsName, "mReflectStaticFields");
AddPropertiesItem(reflectItem, "Static Fields", typeName,
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
typeName.Clear(); typeName.Append(optionsName, "mReflectNonStaticFields");
AddPropertiesItem(reflectItem, "Non-Static Fields", typeName,
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
typeName.Clear(); typeName.Append(optionsName, "mReflectStaticMethods");
AddPropertiesItem(reflectItem, "Static Methods", typeName,
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
typeName.Clear(); typeName.Append(optionsName, "mReflectNonStaticMethods");
AddPropertiesItem(reflectItem, "Non-Static Methods", typeName,
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
typeName.Clear(); typeName.Append(optionsName, "mReflectConstructors");
AddPropertiesItem(reflectItem, "Constructors", typeName,
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
typeName.Clear(); typeName.Append(optionsName, "mReflectMethodFilter");
AddPropertiesItem(reflectItem, "Method Filter", typeName);

View file

@ -618,13 +618,13 @@ namespace IDE.ui
{
var root = (DarkListViewItem)mPropPage.mPropertiesListView.GetRoot();
AddPropertiesItem(root, "Target Type", "mTargetType", scope String[]
{
(
"Console Application",
"GUI Application",
"Library",
"Dynamic Library",
"Custom Build"
});
));
AddPropertiesItem(root, "Project Name Aliases", "mAliases");
}
@ -822,7 +822,7 @@ namespace IDE.ui
AddPropertiesItem(category, "Reloc Model", "mBeefOptions.mRelocType");
AddPropertiesItem(category, "PIC Level", "mBeefOptions.mPICLevel");
AddPropertiesItem(category, "Optimization Level", "mBeefOptions.mOptimizationLevel",
scope String[] { "O0", "O1", "O2", "O3", "Og", "Og+" }); // -O0 .. -O3, -Os, -Ofast, -Og
scope String[] ( "O0", "O1", "O2", "O3", "Og", "Og+" )); // -O0 .. -O3, -Os, -Ofast, -Og
AddPropertiesItem(category, "LTO", "mBeefOptions.mLTOType");
AddPropertiesItem(category, "Vectorize Loops", "mBeefOptions.mVectorizeLoops");
AddPropertiesItem(category, "Vectorize SLP", "mBeefOptions.mVectorizeSLP");
@ -848,7 +848,7 @@ namespace IDE.ui
AddPropertiesItem(category, "Other C Flags", "mCOptions.mOtherCFlags");
AddPropertiesItem(category, "Other C++ Flags", "mCOptions.mOtherCPPFlags");
AddPropertiesItem(category, "Enable Beef Interop", "mCOptions.mEnableBeefInterop",
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
var parent = AddPropertiesItem(category, "Include Paths", "mCOptions.mIncludePaths");
parent = AddPropertiesItem(category, "Preprocessor Macros", "mCOptions.mPreprocessorMacros");
//parent.MakeParent();
@ -858,23 +858,23 @@ namespace IDE.ui
category.mIsBold = true;
category.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, cHeaderColor);
AddPropertiesItem(category, "Disable C++ Exceptions", "mCOptions.mDisableExceptions",
scope String[] { "No", "Yes (-fno-exceptions)" }); // -fno-exceptions
scope String[] ( "No", "Yes (-fno-exceptions)" )); // -fno-exceptions
AddPropertiesItem(category, "SIMD Instructions", "mCOptions.mSIMD"); // -msse, -msse2, -msse4.1, -mno-sse
AddPropertiesItem(category, "Generate LLVM IR", "mCOptions.mGenerateLLVMAsm",
scope String[] { "No", "Yes (-emit-llvm)" });
scope String[] ( "No", "Yes (-emit-llvm)" ));
AddPropertiesItem(category, "No Omit Frame Pointers", "mCOptions.mNoOmitFramePointers",
scope String[] { "No", "Yes (-fno-omit-frame-pointer)" }); //-fno-omit-frame-pointer
scope String[] ( "No", "Yes (-fno-omit-frame-pointer)" )); //-fno-omit-frame-pointer
AddPropertiesItem(category, "Disable Inlining", "mCOptions.mDisableInlining",
scope String[] { "No", "Yes (-fno-inline)" }); // -fno-inline
scope String[] ( "No", "Yes (-fno-inline)" )); // -fno-inline
AddPropertiesItem(category, "Strict Aliasing", "mCOptions.mStrictAliasing",
scope String[] { "No", "Yes (-fstrict-aliasing)" }); // -fstrict-aliasing
scope String[] ( "No", "Yes (-fstrict-aliasing)" )); // -fstrict-aliasing
AddPropertiesItem(category, "Fast Math", "mCOptions.mFastMath",
scope String[] { "No", "Yes (-ffast-math)" }); // -ffast-math
scope String[] ( "No", "Yes (-ffast-math)" )); // -ffast-math
AddPropertiesItem(category, "Disable RTTI", "mCOptions.mDisableRTTI",
scope String[] { "No", "Yes (-fno-rtti)" }); // -fno-rtti
scope String[] ( "No", "Yes (-fno-rtti)" )); // -fno-rtti
AddPropertiesItem(category, "Optimization Level", "mCOptions.mOptimizationLevel"); // -O0 .. -O3, -Os, -Ofast, -Og
AddPropertiesItem(category, "Debug Info", "mCOptions.mEmitDebugInfo",
scope String[] { "None", "DWARF (-g)" });
scope String[] ( "None", "DWARF (-g)" ));
AddPropertiesItem(category, "Address Sanitizer", "");
category.Open(true, true);
@ -882,17 +882,17 @@ namespace IDE.ui
category.mIsBold = true;
category.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, cHeaderColor);
AddPropertiesItem(category, "All warnings", "mCOptions.mAllWarnings",
scope String[] { "No", "Yes (-Wall)" }); // -Wall
scope String[] ( "No", "Yes (-Wall)" )); // -Wall
AddPropertiesItem(category, "Effective C++ Violations", "mCOptions.mEffectiveCPPViolations",
scope String[] { "No", "Yes (-Weffc++)" }); //-Weffc++
scope String[] ( "No", "Yes (-Weffc++)" )); //-Weffc++
AddPropertiesItem(category, "Pedantic", "mCOptions.mPedantic",
scope String[] { "No", "Yes (-pedantic)" }); //-pedantic
scope String[] ( "No", "Yes (-pedantic)" )); //-pedantic
AddPropertiesItem(category, "Warnings as errors", "mCOptions.mWarningsAsErrors",
scope String[] { "No", "Yes (-Werror)" }); //-Werror
scope String[] ( "No", "Yes (-Werror)" )); //-Werror
AddPropertiesItem(category, "Specific Warnings As Errors", "",
scope String[] { "No", "Yes (-Werror=)" }); // -Werror=
scope String[] ( "No", "Yes (-Werror=)" )); // -Werror=
AddPropertiesItem(category, "Disable Specific Warnings", "",
scope String[] { "No", "Yes (-Wno-)" }); //-Wno-
scope String[] ( "No", "Yes (-Wno-)" )); //-Wno-
category.Open(true, true);
}

View file

@ -1919,7 +1919,7 @@ namespace IDE.ui
if ((fieldType == typeof(bool)) && (useOptionValues == null))
{
propEntry.mOptionValues = new String[] { new String("No"), new String("Yes") };
propEntry.mOptionValues = new String[] ( new String("No"), new String("Yes") );
}
if (fieldType.IsNullable)

View file

@ -194,7 +194,7 @@ namespace IDE.ui
public bool mIgnoreKeyChar; // This fixes cases where a KeyDown changes focus to us but then we get a KeyChar that doesn't belong to us
public bool mIgnoreSetHistory;
public static uint32[] sTextColors = new uint32[]
{
(
0xFFFFFFFF, // Normal
0xFFE1AE9A, // Keyword
0XFFC8A0FF, // Literal
@ -215,7 +215,7 @@ namespace IDE.ui
0xFFFFFF80, // BuildWarning
0xFF9090C0, // VisibleWhiteSpace
} ~ delete _;
) ~ delete _;
bool mHasCustomColors;
FastCursorState mFastCursorState ~ delete _;

View file

@ -777,7 +777,7 @@ namespace IDE.ui
allocPropEntry.mOnUpdate();
AddPropertiesItem(category, "SIMD Instructions", "mBfSIMDSetting");
AddPropertiesItem(category, "Optimization Level", "mBfOptimizationLevel",
scope String[] { "O0", "O1", "O2", "O3", "Og", "Og+"});
scope String[] ( "O0", "O1", "O2", "O3", "Og", "Og+"));
AddPropertiesItem(category, "LTO Type", "mLTOType");
AddPropertiesItem(category, "No Omit Frame Pointers", "mNoOmitFramePointers");
AddPropertiesItem(category, "Large Strings", "mLargeStrings");
@ -789,17 +789,17 @@ namespace IDE.ui
category.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, cHeaderColor);
AddPropertiesItem(category, "Debug Info", "mEmitDebugInfo");
AddPropertiesItem(category, "Runtime Checks", "mRuntimeChecks",
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
AddPropertiesItem(category, "Dynamic Cast Check", "mEmitDynamicCastCheck",
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
AddPropertiesItem(category, "Object Debug Flags", "mEnableObjectDebugFlags",
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
AddPropertiesItem(category, "Object Access Check", "mEmitObjectAccessCheck",
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
AddPropertiesItem(category, "Realtime Leak Check", "mEnableRealtimeLeakCheck",
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
AddPropertiesItem(category, "Enable Hot Compilation", "mAllowHotSwapping",
scope String[] { "No", "Yes" });
scope String[] ( "No", "Yes" ));
AddPropertiesItem(category, "Alloc Stack Trace Depth", "mAllocStackTraceDepth");
category.Open(true, true);