Skip to content

Commit e6485cf

Browse files
author
SlavaRa
committed
Replace 'if(value == true)' by 'if(value)'
Replace 'if(value == false)' by 'if(!value)'
1 parent 4140542 commit e6485cf

File tree

11 files changed

+40
-40
lines changed

11 files changed

+40
-40
lines changed

External/Plugins/ASClassWizard/Wizards/PackageBrowser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private void RefreshTree()
7676
{
7777
foreach (string item in Directory.GetDirectories(cp))
7878
{
79-
if (IsDirectoryExcluded(item) == false)
79+
if (!IsDirectoryExcluded(item))
8080
{
8181
node = new SimpleDirectoryNode(item, Path.Combine(cp, item));
8282
node.ImageIndex = Icons.Folder.Index;
@@ -110,7 +110,7 @@ private void onBeforeExpandNode(Object sender, TreeViewCancelEventArgs e)
110110

111111
foreach (string item in Directory.GetDirectories(node.directoryPath))
112112
{
113-
if (IsDirectoryExcluded(item) == false)
113+
if (!IsDirectoryExcluded(item))
114114
{
115115
newNode = new SimpleDirectoryNode(item, Path.Combine(node.directoryPath, item));
116116
newNode.ImageIndex = Icons.Folder.Index;

External/Plugins/ResultsPanel/PluginUI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ private void AddToGroup(ListViewItem item, String path)
785785
}
786786
if (found)
787787
{
788-
if (gp.Items.Contains(item) == false)
788+
if (!gp.Items.Contains(item))
789789
{
790790
gp.Items.Add(item);
791791
}

PluginCore/DockPanelSuite/Customization/InertButton.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ protected override void OnMouseDown(MouseEventArgs e)
325325
if (e.Button != MouseButtons.Left)
326326
return;
327327

328-
if (m_mouseCapture == false || m_mouseOver == false)
328+
if (!m_mouseCapture || !m_mouseOver)
329329
{
330330
m_mouseCapture = true;
331331
m_mouseOver = true;
@@ -358,7 +358,7 @@ protected override void OnMouseUp(MouseEventArgs e)
358358
if (e.Button != MouseButtons.Left)
359359
return;
360360

361-
if (m_mouseOver == true || m_mouseCapture == true)
361+
if (m_mouseOver || m_mouseCapture)
362362
{
363363
m_mouseOver = false;
364364
m_mouseCapture = false;
@@ -606,7 +606,7 @@ private void DrawBorder(Graphics g)
606606
protected override void OnEnabledChanged(EventArgs e)
607607
{
608608
base.OnEnabledChanged(e);
609-
if (Enabled == false)
609+
if (!Enabled)
610610
{
611611
m_mouseOver = false;
612612
m_mouseCapture = false;

PluginCore/DockPanelSuite/Docking/DockPanel.AutoHideWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ private void AnimateWindow(bool show)
183183
if (show)
184184
{
185185
Bounds = DockPanel.GetAutoHideWindowBounds(new Rectangle(-rectTarget.Width, -rectTarget.Height, rectTarget.Width, rectTarget.Height));
186-
if (Visible == false)
186+
if (!Visible)
187187
Visible = true;
188188
PerformLayout();
189189
}
190190

191191
SuspendLayout();
192192

193193
LayoutAnimateWindow(rectSource);
194-
if (Visible == false)
194+
if (!Visible)
195195
Visible = true;
196196

197197
int speedFactor = 1;

PluginCore/PluginCore/Controls/ShellContextMenu.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ private void InvokeContextMenuDefault(FileInfo[] arrFI)
393393
return;
394394
}
395395

396-
if (false == GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr))
396+
if (!GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr))
397397
{
398398
ReleaseAll();
399399
return;
@@ -481,7 +481,7 @@ private void ShowContextMenu(Point pointScreen)
481481
return;
482482
}
483483

484-
if (false == GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr))
484+
if (!GetContextMenuInterfaces(_oParentFolder, _arrPIDLs, out iContextMenuPtr))
485485
{
486486
ReleaseAll();
487487
return;

PluginCore/PluginCore/Utilities/InteropSHFileOperation.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -156,22 +156,22 @@ public ushort Flag
156156
get
157157
{
158158
ushort returnValue = 0;
159-
if (this.FOF_MULTIDESTFILES == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_MULTIDESTFILES;
160-
if (this.FOF_CONFIRMMOUSE == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_CONFIRMMOUSE;
161-
if (this.FOF_SILENT == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_SILENT;
162-
if (this.FOF_RENAMEONCOLLISION == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_RENAMEONCOLLISION;
163-
if (this.FOF_NOCONFIRMATION == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCONFIRMATION;
164-
if (this.FOF_WANTMAPPINGHANDLE == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_WANTMAPPINGHANDLE;
165-
if (this.FOF_ALLOWUNDO == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_ALLOWUNDO;
166-
if (this.FOF_FILESONLY == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_FILESONLY;
167-
if (this.FOF_SIMPLEPROGRESS == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_SIMPLEPROGRESS;
168-
if (this.FOF_NOCONFIRMMKDIR == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCONFIRMMKDIR;
169-
if (this.FOF_NOERRORUI == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOERRORUI;
170-
if (this.FOF_NOCOPYSECURITYATTRIBS == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCOPYSECURITYATTRIBS;
171-
if (this.FOF_NORECURSION == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NORECURSION;
172-
if (this.FOF_NO_CONNECTED_ELEMENTS == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NO_CONNECTED_ELEMENTS;
173-
if (this.FOF_WANTNUKEWARNING == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_WANTNUKEWARNING;
174-
if (this.FOF_NORECURSEREPARSE == true) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NORECURSEREPARSE;
159+
if (this.FOF_MULTIDESTFILES) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_MULTIDESTFILES;
160+
if (this.FOF_CONFIRMMOUSE) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_CONFIRMMOUSE;
161+
if (this.FOF_SILENT) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_SILENT;
162+
if (this.FOF_RENAMEONCOLLISION) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_RENAMEONCOLLISION;
163+
if (this.FOF_NOCONFIRMATION) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCONFIRMATION;
164+
if (this.FOF_WANTMAPPINGHANDLE) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_WANTMAPPINGHANDLE;
165+
if (this.FOF_ALLOWUNDO) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_ALLOWUNDO;
166+
if (this.FOF_FILESONLY) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_FILESONLY;
167+
if (this.FOF_SIMPLEPROGRESS) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_SIMPLEPROGRESS;
168+
if (this.FOF_NOCONFIRMMKDIR) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCONFIRMMKDIR;
169+
if (this.FOF_NOERRORUI) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOERRORUI;
170+
if (this.FOF_NOCOPYSECURITYATTRIBS) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NOCOPYSECURITYATTRIBS;
171+
if (this.FOF_NORECURSION) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NORECURSION;
172+
if (this.FOF_NO_CONNECTED_ELEMENTS) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NO_CONNECTED_ELEMENTS;
173+
if (this.FOF_WANTNUKEWARNING) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_WANTNUKEWARNING;
174+
if (this.FOF_NORECURSEREPARSE) returnValue |= (ushort)FILEOP_FLAGS_ENUM.FOF_NORECURSEREPARSE;
175175
return returnValue;
176176
}
177177
}

PluginCore/SharpZipLib/Zip/Compression/Streams/DeflaterOutputStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public DeflaterOutputStream(Stream baseOutputStream, Deflater deflater, int buff
110110
throw new ArgumentNullException("baseOutputStream");
111111
}
112112

113-
if (baseOutputStream.CanWrite == false) {
113+
if (!baseOutputStream.CanWrite) {
114114
throw new ArgumentException("Must support writing", "baseOutputStream");
115115
}
116116

PluginCore/SharpZipLib/Zip/ZipEntry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,10 @@ public int Version
571571
else if (CompressionMethod.Deflated == method) {
572572
result = 20;
573573
}
574-
else if (IsDirectory == true) {
574+
else if (IsDirectory) {
575575
result = 20;
576576
}
577-
else if (IsCrypted == true) {
577+
else if (IsCrypted) {
578578
result = 20;
579579
}
580580
else if (HasDosAttributes(0x08) ) {
@@ -1204,7 +1204,7 @@ public static string CleanName(string name)
12041204
return string.Empty;
12051205
}
12061206

1207-
if (Path.IsPathRooted(name) == true) {
1207+
if (Path.IsPathRooted(name)) {
12081208
// NOTE:
12091209
// for UNC names... \\machine\share\zoom\beet.txt gives \zoom\beet.txt
12101210
name = name.Substring(Path.GetPathRoot(name).Length);

PluginCore/SharpZipLib/Zip/ZipFile.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ public Stream GetInputStream(long entryIndex)
812812
CompressionMethod method = entries_[entryIndex].CompressionMethod;
813813
Stream result = new PartialInputStream(this, start, entries_[entryIndex].CompressedSize);
814814

815-
if (entries_[entryIndex].IsCrypted == true) {
815+
if (entries_[entryIndex].IsCrypted) {
816816
#if NETCF_1_0
817817
throw new ZipException("decryption not supported for Compact Framework 1.0");
818818
#else
@@ -2381,7 +2381,7 @@ Stream GetOutputStream(ZipEntry entry)
23812381
{
23822382
Stream result = baseStream_;
23832383

2384-
if ( entry.IsCrypted == true ) {
2384+
if ( entry.IsCrypted ) {
23852385
#if NETCF_1_0
23862386
throw new ZipException("Encryption not supported for Compact Framework 1.0");
23872387
#else
@@ -3094,7 +3094,7 @@ void ReadEntries()
30943094
// this could be invalid.
30953095
// Could also speed this up by reading memory in larger blocks.
30963096

3097-
if (baseStream_.CanSeek == false) {
3097+
if (!baseStream_.CanSeek) {
30983098
throw new ZipException("ZipFile stream must be seekable");
30993099
}
31003100

@@ -3275,7 +3275,7 @@ Stream CreateAndInitDecryptionStream(Stream baseStream, ZipEntry entry)
32753275
PkzipClassicManaged classicManaged = new PkzipClassicManaged();
32763276

32773277
OnKeysRequired(entry.Name);
3278-
if (HaveKeys == false) {
3278+
if (!HaveKeys) {
32793279
throw new ZipException("No password available for encrypted stream");
32803280
}
32813281

@@ -3287,7 +3287,7 @@ Stream CreateAndInitDecryptionStream(Stream baseStream, ZipEntry entry)
32873287
if (entry.Version == ZipConstants.VERSION_AES) {
32883288
//
32893289
OnKeysRequired(entry.Name);
3290-
if (HaveKeys == false) {
3290+
if (!HaveKeys) {
32913291
throw new ZipException("No password available for AES encrypted stream");
32923292
}
32933293
int saltLen = entry.AESSaltLen;
@@ -3324,7 +3324,7 @@ Stream CreateAndInitEncryptionStream(Stream baseStream, ZipEntry entry)
33243324
PkzipClassicManaged classicManaged = new PkzipClassicManaged();
33253325

33263326
OnKeysRequired(entry.Name);
3327-
if (HaveKeys == false) {
3327+
if (!HaveKeys) {
33283328
throw new ZipException("No password available for encrypted stream");
33293329
}
33303330

PluginCore/SharpZipLib/Zip/ZipHelperStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void WriteLocalHeader(ZipEntry entry, EntryPatchData patchData)
226226
WriteLEShort((byte)method);
227227
WriteLEInt((int)entry.DosTime);
228228

229-
if (headerInfoAvailable == true) {
229+
if (headerInfoAvailable) {
230230
WriteLEInt((int)entry.Crc);
231231
if ( entry.LocalHeaderRequiresZip64 ) {
232232
WriteLEInt(-1);

0 commit comments

Comments
 (0)