Fixed comments that were inconsistent with the style guidelines described in C++ core guidelines and the modern C++/WinRT language projections and removed trailing whitespace.
Inserted a space after the beginning of the comment so the text wasn't touching the // on all occurrences.
Removed all occurrences of trailing whitespace
If we allow users to select texts, the application will feel more like a "Desktop app", will be easier to use on a tablet and users will be more prompt to use Ctrl+C to use the result in another app.
Saved 301 KB out of 9.2 MB. 15.8% per file on average (up to 82.2%)
Fixes #.
Saves 301 KB (although not all files are included in the build)
Description of the changes:
For PNG files: used a combination of Pngcrush, OxiPNG, AdvPNG, PNGOUT and Zopfli
For GIF files: used Gifsicle
How changes were validated:
No changes to behaviour or source code.
Previewed the changed files to make sure they still work
This change makes the 73 variables in ratconst.h actually
inline const, which allows them to move from the mutable .data
section of the executable, and into the read-only .rdata
section instead.
Moving data to the .rdata section has a number of benefits,
such as preventing possible corruption due to stray writes,
or other memory corruption.
Additionally, the initialization at run-time start-up is no
longer needed, so there is also a reduction in the .text
(code) section as well.
As a result the overall size of the Calculator.exe binary
(on x64 Release builds) decreases by 1,536 bytes (or ~1.5 KB)
with no change in behavior other than a small performance benefit.
#225 accidentally added a duplicate .editorconfig to the repo as well as to the solution.
#257 removed the duplicate .editorconfig, but not its entry in the solution.
This update removes the extra .editorconfig reference to a version that #257 already removed from the repo.
### Description of the changes:
There are currently 11 copies of the `EMPTY_UNIT` object in the
`Calculator.exe` binary, which not only wastes space/footprint in the
binary itself, but also means that each copy must be separately
initialized, which effects performance.
The reason for this is that the object is defined in a shared header
file, which then is included by multiple .cpp files, causing each
translation unit (.obj) to get a full complete copy of the object.
By marking the object as `inline` we can
instruct the linker to define the object once, as we do
not need to have 11 unique versions of the EMPTY_UNIT object,
we only need 1.
The net result is that the `Calculator.exe` binary size is reduced by
2,560 bytes (or 2.5 KB) with no change in behavior, other than
the small performance benefit of not initializing 10 redundant copies
of the object.
### How changes were validated:
- Manually tested.
CopyPasteManager unit tests were not fully run, the first item of arrays were never tested. (Luckily, the not-tested values were ok).
Updated from using a pre-decrement while loop to using a standard for loop with an iterator.
To maintain consistent code style between contributors and simplify merging, the solution should provide a .editorconfig to set some basic rules (already used by the current code source).
- use `UTF-8` with BOM (some files are without)
- use CR-LF
- use <kbd>Space</kbd> to indent (sorry #teamTab)
- trim trailing whitespace
- be sure to add a new line at the end of files.
[Documentation](https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2017)
Looks like the comment on IsEven should read this way instead of "The assumption here is its numerator is 1 and we are testing the numerator is even or not"
When building for x64, the compiler complains:
warning C4267: 'argument': conversion from 'size_t' to 'ULONG', possible loss of data
In practice, the number string will not exceed a ULONG in length.
* added bug report and feature request issue tempaltes
* copied pull_request_template.md to .github folder
* Updated the DateCalculation narrator logic to use PropertyChangedCallbacks for the DateResultLabel and DateDiffAllUnitsResultLabel TextBlocks.
* Reverted textblock callback changes and added an event handler for when the radio buttons are checked.
* Revert NarratorAnnouncement.h changes and removed unused code from DataCalculator.xaml.h. Updated comments in RaiseNotification method in DateCalculator.xaml.cpp
* Reverted changes in NarratorAnnouncement.h and NarratorAnnouncement.cpp
* Added SAL annotation to AddSubtractOption_Checked
* Remove namespaces from input types on AddSubtractOption_Checked
All Calculator app iconography uses the "developer version" icon from Design,
to help differentiate a developer build of Calculator from the official version.
Assets have been run through the image compression tools to ensure all unnecessary
metadata has been removed.